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. 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.