I have an ASPX page with a single text box and one submit button. When I enter a zip code into the text box and press the Enter key, the page just reloads. However, if I remove the focus from the text box by clicking somewhere else on the page and then press the Enter key, the submit occurs and the next page loads as I want.
Code Snippet:
<INPUT name="yourZipCode">
<INPUT onclick="validateForm(this
.form, '/nextpage.aspx');return false;" id="buttonid" type="submit" value="NEXT" name="homeFind">
I have tried writing a custom onkeypress event handler to catch the Return keypress and then click the button in the event handler using document.getElementById("b
uttonid").
click();
but result is the same.
I am using ,NET Framework 1.1
Start Free Trial