Jump to content

Carriage Return Vs. Multi Submit Buttons


chibineku

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...