Hi all,
I have a remote_form_for which posts to an action in a controller which has a
.rjs template to be rendered afterwards.
In the remote_form_for, I''m passing a :complete parameter as follows.
:complete => ''Form.enable("login-form")''
The rjs template gets rendered and returned and it does perform the actions on
the page, however, it does not trigger the :complete call.
It also does not trigger a call in application.js to the registered anonymous
callbacks I have placed there as follows:
Ajax.Responders.register({
onCreate: function() {
if(Ajax.activeRequestCount > 0)
document.getElementById(''ajaxloading'').style.visibility="visible";
},
onComplete: function() {
if(Ajax.activeRequestCount == 0)
document.getElementById(''ajaxloading'').style.visibility="hidden";
}
})
If I replace the .rjs template with a .rhtml file it does trigger the callbacks
in application.js, but I can''t seem to figure out why it will not
consider my ajax complete when returning only the javascript. Any thoughts?
Thanks,
David
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
starting at 1?/min.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060819/1e1b2e63/attachment.html