Hi,
In the body tag of your page add this:
onkeypress="CheckLoginSubmit();"
Then put this in the <head> section of your page:
<script language="javascript">
function CheckLoginSubmit() {
if (event.keyCode == 13) {
document.getElementById("btnLogin").focus();
}
}
</script>
Now, when the Enter key is hit it will switch focus to the button and cause
a submit. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight
If you sign up under me and need help, email me.
"Jinsong" <ji*****@mssolution.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Is there a way that I can catch the key press at page (form) level? I
have a page with about 15 controls. but there is only one submit
button. I want to do form submit when user press the enter button.
thanks