views:

30

answers:

0

I'm using Ajax to refresh the contents of a div each time a subsequent request is made. It's important that the requests occur serially because the requests are being made to a billing system where each request represents a queue action that needs to complete before the next one can proceed. So I have set the xmlhttp.open boolean parameter to false.

This is working in FF but not in IE8. I have tried two solutions without success...

  1. appending a random value to the end of the request using "'&timeid=' + (Math.random()*100000)" to ensure that the url is unique for each request with hopes that it will thwart the reported IE cache practices.

  2. Changed GET to POST.

No luck with either one.

The code...

#--------------------------------------------------------------------------------------
  i = 0;
  for (step in queue_id) {
   document.getElementById("barber_pole").innerHTML='\
    <center>\
    <table border="0" cellpacing="1" cellpadding="1">\
     <tr><td style="text-align:left"><B>Processing Order</B><span style="float:right;">Step ' + (i + 1) + '/' + queue_id.length + '</span></td></tr>\
     <tr><td style="background-color:#FFFFFF;height:1.5px"></td></tr>\
     <tr><td height="20" style="text-align:center">' + queue_ax[i] + '...</td></tr>\
     <tr><td height="20"><IMG SRC="../_include/images/barber_pole.gif" style="vertical-align: middle;"></td></tr>\
    </table>\
    </center>';
   xmlhttp = ajax_request(); // Create request object
   xmlhttp.onreadystatechange=function () {
    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
     1;
    }
   }

   xmlhttp.open("GET","../_include/process.php?order_id=<?= $_REQUEST['order_id'] ?>&order_action_id=" + queue_id[step] + '&timeid=' + (Math.random()*100000),false);
   xmlhttp.send(); 
#--------------------------------------------------------------------------------------

It hurts. Please help...

Thanks Very Much