What I've learned is that here is no standard or recommendation defining what should happen when the user hits enter on a text box, so browsers are allowed to do whatever they want.
OTOH, this is what I've observed: When the user hit's enter while context is in a text box: 1. Internet Explorer 6 with single text box does not submit any submit button, it just submits the text box value. 2. IE 6 with multiple text boxes submits the first submit button on the form. 3. Opera 7 with any text boxes submits the first submit button AFTER the text box. This lead my design to the least-destructive submit button first, and placed after all text boxes. Where there's only one text box in the form, I assume a default action on the server side. I did not try any other browsers (i.e. netscape, safari, etc.), any other version of the above browsers, or any other platforms (tested only on W2K Pro). This page http://ppewww.ph.gla.ac.uk/~flavell/www/formquestion.html seems to have a good summary and explains item 1 above with a suggestion found in the HTML 2.0 spec: http://www.w3.org/MarkUp/html-spec/html-spec_8.html#SEC8.2 This google link suggests that alot of people have been talking about this issue: http://www.google.com/search?q=form+submit+enter ._. Brian -----Original Message----- From: Glanville, Jay [mailto:[EMAIL PROTECTED] Sent: Monday, March 22, 2004 2:51 PM To: Struts User List Subject: [OT] multiple submit buttons on a single page Hello all. A slightly of-topic question for the group ... The situation: a form with two submit buttons, and the user doesn't use either of them, but instead submits the form by pressing enter/return in one of the text fields. Question: how does the form get submitted? Is it by: - the action attribute of the form (<form name="XXY" action="Action.do">) - the first submit button - the second submit button - both submit buttons My tests have shown one answer, but I'd like some confirmation (just because test X says something doesn't mean my test is accurate! ;-) ). Thanks JDG -- Jay Glanville --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]