After reading "Form Submission" at http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13 this behaviour seems correct.
=== cut here === 17.13.3 Processing form data When the user submits a form (e.g., by activating a submit button), the user agent processes it as follows. Step one: Identify the successful controls ... A successful control is "valid" for submission. Every successful control has its control name paired with its current value. ... If a form contains more than one submit button, only the activated submit button is successful. === cut here === So, you button was not "activated", thus it was not submitted. Noting mostly to myself: regular button which is not a "submit" type, will be sent to the server. So, if I have five regular buttons, all of them will be sent. But at most one "submit" button will be sent if it is "activated", or no submit buttons at all. On 4/29/05, Eoin Dunne <[EMAIL PROTECTED]> wrote: > Rick you hit the nail on the head. In my mind I thought that when I hit > 'enter' and when I clicked the button they were doing the same thing (in > fact someone asked me this ealier). > > But now I realize it was failing when I hit enter and working when I pushed > the button. The reason for this is Internet Explorer has a concept of a > default submit action when enter is pushed. So it submits the form to the > server but with no specified method parameter because no button was pushed. > > So on forms with only one button having a hidden input field works... > > <input type="hidden" name="method" value="<bean:message > key="function.addcomponent"/>" /> > > <html:submit property="method"> > <bean:message key="function.addcomponent"/> > </html:submit> > > If you click enter on this form your http post parameters look something > like this.. > > componentName=some+component+name&method=AddComponent > > If you push the button with your mouse your parameters look like this: > > componentName=some+component+name&method=AddComponent&method=AddComponent > > This works fine because on the server it build a map of these key value > pairs. However, this will be problematic on pages where you have 2 or more > submit buttons. > > I think in that case you are doomed to some java script hack to over-ride > internet explorers default behavior. Or you can assume in your > LookupDispatchAction that if the "Unspecified" method is called, the user > pushed enter and didn't actually click one of the submit buttons. > > That does seem a bit weak though. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]