DaveSefton
Programmer
Hello
I'm trying to start a process and then continue on with my current page while this process is running in background. My assumption with code below is that once POST is sent, it will then continue thru code and 'submit' the form 'without' waiting for POST process to complete. The 'submit' works fine but it always waits for process to complete before submitting form.
Thx for any help, Dave
.....code below...........
<script type="text/javascript">
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
//alert("new");
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//alert("old");
}
//
sAJOrdnum = "99900150";
sAJLine = "2";
url = " + sAJOrdnum + "&LINENUM=" + sAJLine;
//alert (url);
xmlhttp.open("POST",url,true);
xmlhttp.send(null);
document.forms[0].action = ' + 'Test';
document.forms[0].submit();
}
</script>
I'm trying to start a process and then continue on with my current page while this process is running in background. My assumption with code below is that once POST is sent, it will then continue thru code and 'submit' the form 'without' waiting for POST process to complete. The 'submit' works fine but it always waits for process to complete before submitting form.
Thx for any help, Dave
.....code below...........
<script type="text/javascript">
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
//alert("new");
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
//alert("old");
}
//
sAJOrdnum = "99900150";
sAJLine = "2";
url = " + sAJOrdnum + "&LINENUM=" + sAJLine;
//alert (url);
xmlhttp.open("POST",url,true);
xmlhttp.send(null);
document.forms[0].action = ' + 'Test';
document.forms[0].submit();
}
</script>