Using AJAX and onLoad event, we do populating many <div>s and it
generally takes relatively long time to complete the page loading,
which makes the STOP button indispensable.

The following code generates 9 <div>s and 9 onLoad events to populate
them. It works great, but once the onLoad events are fired, they can't
be stopped. The STOP button of the IE browser can't stop the loading,
and the STOP button of FF browser is deactivated as soon as the code
is loaded. It takes about 1 minute or so to populate all the <div>s,
so sometimes I want to stop the page loading. What should I do to stop
the page loading? I know that onLoad event can't be stopped(Correct
me, if I'm wrong), but cant' we insert some "STOP observe" javascript
things between each onload event?

<?php
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);"
 );

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


--~--~---------~--~----~------------~-------~--~----~
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