Re: Enter versus clicking submit button



need to see complete code.

PS this is JavaScript not ASP

"booner" <bboone@xxxxxxxxxxxxx> wrote in message
news:9M2dnaNZi7ETsxnZnZ2dnUVZ_rednZ2d@xxxxxxxxxxxxxxxx
In my form I have a few text fields (three textfields for SSN) and a
submit button.

<form method="post" target="viewFrame" onsubmit="return onSubmit()">

<input type="submit"
id="submit"
value="Search"
class="button"
onMouseOver="window.status='Click to search for documents'; return
true"
onMouseOut="window.status=''; return true">

In my onSubmit function - I set the focus on the first (of three) SSN
textfields. If I click on the submit button with my mouse - I get
expected behavior. If I click enter - I do not get the same behavior (I
get the focus on the 2nd ssn text field).

In my first ssn textfield:

onkeyup="nextControl(this, this.value)"

the nextControl function just moves the focus to the next ssn field.

Why am I getting different behavior when I click on the submit button
versus hitting the enter key?





.


Loading