This is my ajax function code.
Where would I insert my secondary ajax 'progress' call within this primary ajax call?
PHP Code:
function test_ajax_call()
{
var argument = "test";
var url = "AjaxClickServer.php";
var params = "arg=" + agrument;
http.open("POST", url, true);
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function()
{
if (http.readyState == 4) //Finished loading the response
{
if (http.status == 200)
{
var response = http.responseText;
}
else
{
alert("Ajax error: " + http.statusText);
}
}
}
http.send(params);
}