thanks for your help, but i find that the method onCreate:function() not
work with this code, but yes the onComplete, do yuo know why could be the
problem?
Documento sin título
----- Original Message ----- 
From: "Christophe Porteneuve" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 14, 2007 5:13 AM
Subject: [Rails-spinoffs] Re: Ajax.reponder.unregister seems to not work


>
> Hey there,
>
> I fail to get what you mean, what your problem is, and what you're
> trying to achieve with your code.  I can tell you this, though: your
> code doesn't work anyway, for several reasons:
>
> 1) Responders are intended for global use over a long time.  If you need
> callbacks on a specific request, put the darn callbacks in the specific
> request's options, not in Responders.  Here's an all-around cleaner,
> working version of your code:
>
> var actuaMenu = new Ajax.Updater('toolbar',
>   ruta + "/php_files/clases/Admin/genmenu.php', {
>     parameters: { id: id, subAc: subAc },
>     onCreate: function() {
>       $('toolbar').hide();
>       $('overlay').show();
>     },
>     onComplete: function() {
>       $('toolbar').show();
>       $('overlay').hide();
>       alert("Complete");
>    }
> });
>
> 2) Registering a responder *after* you started a request means you may
> very well miss on a few callbacks, most specifically onCreate.
>
> 3) Requests run asynchronously, so your code registers and then
> immediately deregisters the responders, making it essentially useless.
>
> 4) Ajax.activeRequestCount is already maintained, so don't mess with it:
> you'll break the proper count performed by a Prototype-registered 
> Responder.
>
>
> -- 
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
>
> > 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" 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/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to