Witold Rugowski
2006-Sep-30 00:26 UTC
AJAX helpers and script.aculo.us ''parameters:'' option
Hi! I needed to pass through XHR data generated earlier in JavaScript (so it is not known on rhtml template level), but I could not accomplish this wiht Rails helpers. Is there some way to populate ''parameters:'' option of Ajax.Updater through helpers like remote_function? Or maybe there is other solution than mine (direct use of Ajax.Updater )? My workaround described here: http://nhw.pl/wp/2006/09/30/generating-data-for-ajax-req-in-rails-on-the-fly/ -- Witold Rugowski http://nhw.pl -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Vishnu Gopal
2006-Sep-30 04:43 UTC
Re: AJAX helpers and script.aculo.us ''parameters:'' option
Yes there is, try the :with parameter. It''s documented (somewhat) here: http://rubyonrails.org/api/classes/ActionView/Helpers/PrototypeHelper.html (see AJAX_OPTIONS) :url => { .. }, :with => "''param='' + javascript_variable" Vish On 9/30/06, Witold Rugowski <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Hi! > I needed to pass through XHR data generated earlier in JavaScript (so it > is not known on rhtml template level), but I could not accomplish this > wiht Rails helpers. Is there some way to populate ''parameters:'' option > of Ajax.Updater through helpers like remote_function? > > Or maybe there is other solution than mine (direct use of Ajax.Updater > )? > > My workaround described here: > > http://nhw.pl/wp/2006/09/30/generating-data-for-ajax-req-in-rails-on-the-fly/ > > -- > Witold Rugowski > http://nhw.pl > > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---