Take a look at the code below, specifically line: var url="http://www.example.com/code.php"
Code:
function exampleFunction(str)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Browser does not support HTTP Request")
return
}
var url="http://www.example.com/code.php"
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}
For some reason, my html page struggles to pull this link. However, if I change:
Code:
var url="http://www.example.com/code.php"
to: and drop the file in the same directory as my html file, I have no trouble executing the code.
Am I doing something wrong? Thanks!
|