Jump to content

Carriage Return Vs. Multi Submit Buttons


chibineku
 Share

Recommended Posts

I have a form with 4 fieldsets, each of which has its own submit button with a different name. A script branches depending on which submit button was clicked and makes the relevant updates to a MySQL table. I have noticed that if I hit return in a form field, only the first submit button seems to be fired - changes in other fieldsets don't take effect unless I actually click on the appropriate button. I could separate it into 4 forms, but that means altering styles and HTML etc. etc. Is this normal behaviour?

Link to comment
Share on other sites

AFAIK, it's an implementation defined behaviour, i.e. every browser is free to do it as they please. If all browsers do it this way, it's probably a "convention" (a "de facto standard" if you will), and not an explicit formal standard.

Link to comment
Share on other sites

I misread de facto as taco, somehow. Thanks for the reply. It seems to be an annoying behaviour that I had actually noticed before in IE7. I have chopped my one form into 4, which is fine - everything looks the same, works the same, except now the return key does what I expect. Took all of 20 seconds.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...