var ajaxRequestqqq; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequestqqq = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequestqqq = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequestqqq = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequestqqq.onreadystatechange = function(){
if(ajaxRequestqqq.readyState == 4){
var ajaxDisplayqqq = document.getElementById('rajax');
ajaxDisplayqqq.innerHTML = ajaxRequestqqq.responseText;
}
}
var rurlvar = $("#rurl").val();
var rnameval = $("#rname").val();
var queryStringqqq = "url=" + rurlvar + "&name=" + rnameval;
var urltofileqqq = "subrssajax.php";
ajaxRequestqqq.open("POST", urltofileqqq, true);
ajaxRequestqqq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
ajaxRequestqqq.setRequestHeader("Content-length", queryStringqqq.length);
ajaxRequestqqq.setRequestHeader("Connection", "close");
ajaxRequestqqq.send(queryStringqqq);
***#DELAY#***
var ajaxRequest; // The variable that makes Ajax possible!
try{
// Opera 8.0+, Firefox, Safari
ajaxRequest = new XMLHttpRequest();
} catch (e){
// Internet Explorer Browsers
try{
ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try{
ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e){
// Something went wrong
alert("Your browser broke!");
return false;
}
}
}
// Create a function that will receive data sent from the server
ajaxRequest.onreadystatechange = function(){
if(ajaxRequest.readyState == 4){
var ajaxDisplay = document.getElementById('vrname');
ajaxDisplay.innerHTML = ajaxRequest.responseText;
}
}
//var rurlvar = $("#rurl").val();
//var rnameval = $("#rname").val();
//var queryString = "url=" + rurlvar + "&name=" + rnameval;
var queryString = "url=sss";
var urltofile = "rname.php";
ajaxRequest.open("POST", urltofile, true);
ajaxRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
ajaxRequest.setRequestHeader("Content-length", queryString.length);
ajaxRequest.setRequestHeader("Connection", "close");
ajaxRequest.send(queryString);
How to set delay between the two requests?