[Mono-list] The prove that they can all live together
Gaurav Vaish
gvaish@adobe.com
Sat, 14 Jun 2003 10:31:28 +0530
>
> Actually I've encountered this annoying behavior in ASP.NET in general,
> not just on Mono. It also appears to be browser-dependent. It appears
Of course. It has to be so.
If you look at the code generated, you will notice that the 'submit'
button has a javascript event onclick associated with it. If you press the
'Enter' key on your keyboard, the 'onclick' event never occurs, and hence
the form is never 'PostBack'-ed.
When I started work on ASP.Net controls (WebControls), I strongly felt
that this 'onclick' should be moved to <form> tag and be replaced by
'onsubmit' event. But sadly, this is not how the MS implementation of
ASP.Net goes.
In future, we may add our customized features to Mono / ASP.NET.
> that on a form with a single submit button, pressing 'enter' in a
> textbox will submit the form on all browsers. But there are
> discrepencies between browsers on whether the button's name and value
> get passed as part of the submission (as if the button had been pressed)
> or not (as if the submission happened without any button being pressed).
All the browsers (except NN4.x and lower) cause the event 'onsubmit' to
occur on pressing the 'enter' key, but unless you actually click the submit
button, the 'onclick' event never occurs, and which is the way it is
supposed to function.
So, it is not the fault of the browsers, but the way you handle it.
HIH
Cheers,
Jee-Wee
http://gvaish.virtualave.net
--------------------------------