Split the response or make it a JSON response and loop it or...

evalScripts:true

and have the serverside do the updating

Alex Mcauley
http://www.thevacancymarket.com
----- Original Message ----- 
From: "patrick" <patrick99...@gmail.com>
To: "Prototype & script.aculo.us" <prototype-scriptaculous@googlegroups.com>
Sent: Friday, October 30, 2009 4:33 PM
Subject: [Proto-Scripty] how do you emulate what rjs does in rails with 
form.request?


>
> Hi,
>
> So, if I have a controller action with an rjs template that does
> page.replace_html on several different elements, how can I accomplish
> this same update of multiple elements in my regular js functions?
>
> For example, I have a controller: and in it I do:
> def some_action
>  render :partial => 'some_path/blah'
> end
>
> ...  Then in my js code, I do:
> $('my_form').request({onComplete:
> function(r) {
> $('some_div').update(r.responseText);
> }
> });
>
> But how could I do the same thing but update 3 or 4 divs with
> different partials?
>
> Is rjs really the best way to deal with this sort of thing?
>
> -patrick
> >
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to