If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > PHP > Which Submit Button To Action When Return Key Pressed

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-27-09, 13:24
ozzii ozzii is offline
Registered User
 
Join Date: Mar 2007
Posts: 194
Which Submit Button To Action When Return Key Pressed

Hi,

I have a PHP form with multiple submit buttons eg:

<input type="submit" name="Action" value="Add" >
<input type="submit" name="Action" value="Delete" >
<input type="submit" name="Action" value="Update" >

My problem is when user hits the return key in Firefox the php script assumes the first button was submitted and in IE the scripts does not recognize any submit button if the return key is pressed.

Any suggestion to solve this problem both in firefox an IE?
Reply With Quote
  #2 (permalink)  
Old 06-28-09, 06:48
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,517
If no button is pressed then default it to Add.
In this way you get the same behaviour on both systems.
Personally I'd think about have a cancel button in there as well.

Mike
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On