Jump to content

IE Event Problems


jjacquay712

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.