infamous_Q Posted April 7, 2008 Share Posted April 7, 2008 Ok, I don't know what I'm doing wrong here. I've written some script that is using javascript to send information to a MySQL db through a php page, and receive as well. Now, here's the kicker: I can send things fine, but I cannot receive anything, and it seems the request doesn't change it's state. So in order to trouble shoot I've set up a script that will pop up an alert message box every time the request's state changes, but it never gets passed 1. My code is below (it's snipped a bit, and I only included the non-working code). function getInf() { xmlHttp=GetXmlHttpObject() if (xmlHttp==null) { alert ("Your browswer doesn't support XML"); return; } var idinf="3"; //this number doesn't even matter really for troubleshooting var url="get_inf.php?id=" + idinf; xmlHttp.open("GET",url,true); xmlHttp.onreadystatechange(checkData()); xmlHttp.send(idinf); } function checkData() { alert(xmlHttp.readyState); } Can anybody help me out? 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.