Here is the JavaScript code utilized on my HTML page
<script type="text/javascript>
function loadXMLDoc(HTTP)
{
var xmlHttp;
try {
xmlHttp=new XMLHttpRequest();
} catch (e) {
try {
xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser does not support AJAX!");
return false;
}
}
}
xmlHttp.onreadystatechange=function() {
if (xmlHttp.readyState==4) {
alert(xmlHttp.responseText);
}
}
var params ="dd=123";
xmlHttp.open("POST",HTTP,true);
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.send(params);
}
</script>
In this JavaScript, I want to trigger each ajax function
<script type="text/javascript>
// Here I want to run functions together
return (loadXMLDoc('Page1.asp') && loadXMLDoc('Page2.asp') && loadXMLDoc('Page3.asp'));
</script>
The issue here is that only the first function works and I do not receive the "return" value (meaning 2nd & 3rd functions do not work)
I am looking forward to your feedback