I am trying to trap the enter, down arrow and up arrow keys in my form. I want to set focus to a new field depending on which key is entered. The following code works fine in IE. I need something that works on most browsers (especially Netscape).
<TD align="center" nowrap>
input type="text" name="p_grd_score" size="5" maxlength="5" " id="Cell1" onKeyDown="switch(event.keyCode) {case 40: document.post_grdbk.Cell2.focus();return false; break;
case 13: document.post_grdbk.Cell3.focus();return false; break;
case 38: document.post_grdbk.Cell4.focus();return false; break;}"
</TD>
<TD align="center" nowrap>
input type="text" name="p_grd_score" size="5" maxlength="5" " id="Cell1" onKeyDown="switch(event.keyCode) {case 40: document.post_grdbk.Cell2.focus();return false; break;
case 13: document.post_grdbk.Cell3.focus();return false; break;
case 38: document.post_grdbk.Cell4.focus();return false; break;}"
</TD>