Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    212

    Unanswered: 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?

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •