dsdsdsdsd Posted May 27, 2009 Share Posted May 27, 2009 hello; according to http://msdn.microsoft.com/en-us/library/ms536938(VS.85).aspx, the onkeydown event is defined in HTML 4.0; but I am unable to trigger it in Firefox; any thoughts? thanks, dsdsdsdsd Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/ Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 onkeydown should work fine afaik, https://developer.mozilla.org/en/DOM/element.onkeydown You wouldn't happen to attaching an eventlistener with something like document.getElementById('id').attachEventListener( 'onkeydown', function() {} ) ? Cause there are some differences there between IE and the standard: document.getElementById( 'id' ).appendEventListener( 'keydown', function() {}, false ) (typed that down in a rush as lunch is waiting for me, so hope it isn't total gibberish) Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/#findComment-842981 Share on other sites More sharing options...
dsdsdsdsd Posted May 27, 2009 Author Share Posted May 27, 2009 well, I am using it within html: <div onkeydown = "my_function() " > I will see if using it within js will work for me; thanks, Shannon Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/#findComment-843234 Share on other sites More sharing options...
Maq Posted May 27, 2009 Share Posted May 27, 2009 So this is really a Javascript issue, not an HTML one? Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/#findComment-843247 Share on other sites More sharing options...
dsdsdsdsd Posted May 27, 2009 Author Share Posted May 27, 2009 please shoot me ... I was using my_textarea.innerText += my_result to display the results of my event testing ... innerText apparently only works in IE; my problem had nothing to do with onkeydown; Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/#findComment-843334 Share on other sites More sharing options...
Axeia Posted May 27, 2009 Share Posted May 27, 2009 haha, Yes .innerText is the non standard way, it's .textContent in other browsers (And that's why I always use alert() for tests) Quote Link to comment https://forums.phpfreaks.com/topic/159827-is-onkeydown-legitimate-html/#findComment-843359 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.