Forum Moderators: open
The problem code is here:
var addr = "/common/ajax/chatSend.php";
var tosend = "line=" + encodeURIComponent(textbox.value);
requester.open("POST", addr, true);
requester.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
requester.onreadystatechange = doNothing;
requester.send(tosend);
Instead of sending the "tosend" string, it's not sending anything, so the php script isn't getting the post variable.
The first thing I would check is to see if the problem is on that last line or higher up in the page. Assuming you have access to a machine with IE7 or IE8 installed, try adding some temporary alert() messages to see what these different variables are set to:
alert(tosend);
alert(textbox.value);
alert(textbox);
If those are all what you expect them to be, I would next look at the XMLHttpRequest object itself. I'd take a look at what RonPK posted in this thread [webmasterworld.com] and see if that applies in your case.
One more thing, do you have an actual function defined called "doNothing?" If you don't, IE7 might be choking on the undefined function.
Post back with your debugging progress and we'll do our best to help. :)