in reply to (OT) Need to execute button when i enter "Enter" key

By default 'enter' in a form element calls the submit action for that element. No set up required. Also nothing to do with perl.
  • Comment on Re: (OT) Need to execute button when i enter "Enter" key

Replies are listed 'Best First'.
Re^2: Perl/CGI : Need to execute button when i enter "Enter" key
by EchoAngel (Pilgrim) on Feb 03, 2005 at 22:39 UTC
    can you give me an example? I have multiple submit buttons...
      I have multiple submit buttons...

      Bad karma, but if you must (and yes, there can be a few valid reasons to do so)... make your desired default submit button the first in the form (test... different browsers may behave differently), and make the other buttons "buttons" instead of "submit". Then make those "button" buttons fire a JavaScript submit() with the appropriate action value in a hidden field.