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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.