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