var link="navigate.php?rating="+review;
httpRequest.onreadystatechange=changeStatus
httpRequest.open("GET",link,true)
httpRequest.send(null)
}
}
function changeStatus()
{
if (httpRequest.readyState==4 || httpRequest.readyState=="done")
{
document.getElementById("answer").innerHTML=httpRequest.responseText
}
}
This particular snippet of code is encountering issues with the request. What is the proper way to set up a httpRequest
?