Forum Moderators: open

Message Too Old, No Replies

Why does this code not work on ie

         

MrGecko

9:11 pm on Aug 16, 2007 (gmt 0)

10+ Year Member



why does this code not work on internet explorer?
function sendmessage()
{
message = document.getElementById("message");
messagetext = message.value;
message.value = "";
if (window.XMLHttpRequest) {
check = new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
check = new ActiveXObject("Microsoft.XMLHTTP");
}
check.onreadystatechange = function() {
getupdate();
}
check.open("GET", "<?=$PHP_SELF?>?do=send&message=" + escape(messagetext), true);
check.send(null);
}

MrGecko

1:08 pm on Aug 17, 2007 (gmt 0)

10+ Year Member



I Found Out That On IE I Have To Have Var On document.getElementById("message"); IE Makes Me Mad Why Does It Exist Microsoft Should Quit.

stojadinovicp

11:30 am on Aug 20, 2007 (gmt 0)

10+ Year Member



I agree, many a thing I created with js and they work just fine on Firefox and Opera but IE doesn't know what to do with it...
I feel your pain.

(although var should be there never the less :D )

MrGecko

3:36 pm on Aug 20, 2007 (gmt 0)

10+ Year Member



true i just forgot
i had to add
if (window.XMLHttpRequest) {
check = new XMLHttpRequest();
} else if (window.ActiveXObject) {
isIE = true;
check = new ActiveXObject("Microsoft.XMLHTTP");
}
because ie dose things deferent than all the others web browsers