Difference between hitting enter and clicking submit?

2

23s

My site's login page has a form w/ 2 textboxes and a submit button. If I'm
in either of those textboxes (i.e., either one of the textboxes has focus),
in any given browser, hitting "enter" on my keyboard submits the form.
Server side, I handle the click event of the submit button. This is the
expected behavior, and this is the behavior irrespective of what browser I
use on the login page. However...

I have different page that is an email submittal form. It has just 1
textbox and a submit button. On this page, and only when using IE 6.0,
there is a server-side difference between hitting "enter" as opposed to
physically clicking the submit button on the client. The difference being
that if "enter" is used to submit the form, the page performs a postback
(ispostback = true), but the click event of the button never fires. On the
other hand, if the button is physically clicked on the client, again
ispostback=true but now the click event _does_ fire. This is not the
behavior I was expecting - I expected identical behavior as to my login
form, where the method of submittal on the client is transparent to the
server, which should simply believe that submit button was "clicked".

With other browsers (NN 7.2, FF 1.0, Opera) you can hit "enter" or
physically click and there is no difference server side (the click event
fires either way).

I have gone over the code with a fine toothed comb and cannot find any
relevant difference between my login form and my email form that would cause
this behavior (in fact I was not even aware this behavior was possible). Is
this a known issue of any kind? What exactly should I be looking for here?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top