jjacquay712 Posted August 18, 2009 Share Posted August 18, 2009 this is about as simple as it gets. I have this code: window.onload = function() { chatarea = document.getElementById("chatarea"); textarea = document.getElementById("textarea"); submitbtn = document.getElementById("submit"); update(); submitbtn.onclick = function() { submitChat(); } textarea.onkeydown = function(event) { if ( event.keyCode == 13 ) { submitChat(); event.preventDefault(); } } } It works with firefox, but not IE 8. The problem is with the keydown event, the click event works on IE. Link to comment https://forums.phpfreaks.com/topic/170899-ie-event-problems/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.