TheNewDude
New member
For some reason, I am having trouble opening a connection to a php page via ajax. I have tried an alert on the url to make sure it was using the correct url and it was. I did an alert on the onreadystatechange to make sure it has been reaching level 4. That worked wothout any problems. Then I tried to setup an alert so that I could tell if a connection was being opened, but it doesn't seem to be opening a connection. I tried to send the alert as:
if (xhr.open("GET",url,true)) {
if (xhr.send(null)) {
alert("Success so far");
}
}
I also tried:
if (xhr.open("GET",url,true)) {
alert("Success so far");
xhr.send(null));
}
Neither of those worked so now I am trying to figure out why the connection isn't opening. Does anybody have any suggestions?
if (xhr.open("GET",url,true)) {
if (xhr.send(null)) {
alert("Success so far");
}
}
I also tried:
if (xhr.open("GET",url,true)) {
alert("Success so far");
xhr.send(null));
}
Neither of those worked so now I am trying to figure out why the connection isn't opening. Does anybody have any suggestions?