You probably need to pass the callback functions to Event.observe in a
variable, so you can use that variable when calling
Event.stopObserving(). It's all explained in the prototype
documentation:
http://prototypejs.org/api/event/stopObserving

Also read about Event.stop() which is used for a different thing.

On Apr 8, 12:12 am, "skyblueink" <[EMAIL PROTECTED]> wrote:
> The code below, using prototype and Ajax, populates 3 <div>s.  But,
> once the page is loaded and Event.observing is acting, can I stop the
> populating with a click button? I thought Event.stop() and
> Event.stopObserving() should come, and did some tries but failed.
>
> <div id="red"></div><script type="text/
> javascript">Event.observe(window, 'load',function(event)
> {Ajax.Updater('red','/test/content.php?id=red',...)</script>
>
> <div id="blue"></div><script type="text/
> javascript">Event.observe(window, 'load',function(event)
> {Ajax.Updater('red','/test/content.php?id=blue',...)</script>
>
> <div id="orange"></div><script type="text/
> javascript">Event.observe(window, 'load',function(event)
> {Ajax.Updater('red','/test/content.php?id=orange',...)</script>


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