Heinz Strunk wrote:
> Well, I know how to show and hide a div box but my question was if it's 
> possible to do it for all remote calls or do I have to add
> :loading => "Element.show('ajax-loader')"
> and
> :complete => "Element.hide('ajax-loader')"
> to every single remote call I wanna use the loader for?

Got it... helper was the solution:
def link_to_remote(name, options = {}, html_options = nil)
  options[:loading] = "Element.show('loading')"
  options[:complete] = "Element.hide('loading')"
  link_to_function(name, remote_function(options), html_options || 
options.delete(:html))
end
-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to