So I've got this javascript:
<script type="text/javascript">
    function OnKeyPress() {
        var charCode = window.event.keyCode;
        if (charCode == 13) {                
            window.event.keyCode = 9;
        }
    } document.onkeypress = OnKeyPress;
</script>
The idea is to catch an enter key press, and switch it to tab key press. And it half works - it catches the enter key. But it doesn't make it register as a tab key. I've tried using other keycodes as well (18 for alt) to confirm I wasn't just not seeing the tab happen.
Can anyone see what the problem is? Working in ASP.NET fwiw.
Thanks!
 
     
     
    