I'm updating the <div> with id = indicator to show the progress of
page loading whenever every content(that is, <div>s with id = view0,
view2, vie3,...,view9) is displayed.

<?php
<p><div id='indicator'></div></p>

for ($i = 0; $i < 10; $i++){
     $view = 'view' . $i;
     echo "<div id=$view></div>";

 $options = array(
     'update'   => "$view",
     'url'      => "/test/content/?i=$i",
     'type'     => 'asynchronous',
     'complete' =>
"Effect.Appear($view);Element.update('indicator','$i');"
 );

 echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
}
?>

And when all contents are loaded, I'd like to finally update the
indicator <div> with a string "End".
So I wanted the order of updating indicator will be something like
3,5,7,8,9,2,1,4,6,0,End,
and added some lines below like

<?php
$options = array(
     'update'   => "indicator",
     'url'      => "",
     'type'     => 'asynchronous',
     'complete' => "Element.update('indicator','$i');"
 );

echo $javascript->event('window','load',$ajax-
>remoteFunction($options),false);
?>

But in actual it was like
3,5,7,8,9,2,End,1,4,6,0.

I know it's a natural result due to "asynchronous" type, but indicator
is a indicator, and I want to update it with "End" after all view
<div>s are updated. How can I do it?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to