Hi there, this is my first post!
I'm having a problem with a javascript that works in IE but not in Firefox. I'm working with c# and asp.net. The script is to set the focus to a particular asp image button on the page when the user hit's the 'enter' key. here is the script:
Code:
function onkey() {
if (window.event.keyCode==13) {
document.getElementById("but_update").focus();
}
}
And then in the form tag, I put
Code:
<form id="form1" method="post" runat="server" onkeydown="onkey();">
Now all this works in IE, but not in Firefox. Any idea why?
|