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); } } Link to comment https://forums.phpfreaks.com/topic/102148-compatibility-problem-with-windoweventkeycode-please-healp/ 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 Link to comment https://forums.phpfreaks.com/topic/102148-compatibility-problem-with-windoweventkeycode-please-healp/#findComment-523901 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.