epic_era1 Posted April 21, 2008 Share Posted April 21, 2008 I'm having a compatibility problem with window.event.keyCode, I need it to be cross browsers compatible and can't get it to work on mozilla this is my function: function noenter() { if(count>0){ if((window.event && window.event.keyCode == 13)){ alert(count); document.access.submit(); } } if(window.event.keyCode == 13){ count++; return !(window.event && window.event.keyCode == 13); } } Quote Link to comment Share on other sites More sharing options...
blueman378 Posted April 22, 2008 Share Posted April 22, 2008 hi there, firefox and ie use different things for the keypresses, key = event.keyCode //ie else key = e.which //firefox Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.