Jump to content

ajax onreadystate==3


basty_dread

Recommended Posts

Hello guys.. i need your helps..

 

i have a problem on ajax onreadystate==3 this is when the request is currently processing right?

on my php code:

 

foreach($query->result_array() as $row){

  $productId = $row['pID'];

  $this->generatevalue($productId);  //

  echo $productId." is Finished";  // show the product that is currently processing

}

echo "All Items Are Updated!"; // on ready state ==4  the function is finished

 

this is my ajax function:

 

ajaxRequest.onreadystatechange = function(){

  if(ajaxRequest.readyState==3){

    message = ajaxRequest.responseText;

    document.getElementById(prid).innerHTML = message

  }else if(ajaxRequest.readyState == 4){

    message = ajaxRequest.responseText;

    document.getElementById(prid).innerHTML = message;

}

}

 

 

my question is how could i get the product that are corrently processing..?

my code only displays the first record that is being processed..

please help... :'(

thanks a lot..

 

 

Link to comment
https://forums.phpfreaks.com/topic/208016-ajax-onreadystate3/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.