If you are using rails 2 you may want to check examples for
''observe_field'' and ''observe_form'' helpers;
they''ll use ajax to update
your page without reloading it.
If you are using rails 3 you''ll have to find their new counterparts,
as these 2 are deprecated. Unfortunately I can''t give more info about
this since I''m slightly outdated with R3.
Regards
On 15 nov, 21:38, Pete
<peterhugh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi
>
> I am trying to refresh the contents of a page after selecting certain
> options on a drop-down list.
>
> I have created the drop down as such:
>
> <%= select_tag "itemSelect",
options_for_select([''All'', ''Latest''],
> ''All''), { :onchange => remote_function(
> :with =>
''Form.Element.serialize(this)'',
> :url => {:action => ''finishedItems''}) }
%>
>
> This passes back the correct value to the controller, and I use this
> to change values in a named_scope to generate the relevant content in
> the rest of the page.
>
> However I am unsure of how to refresh this content, without completely
> reloading the page,
>
> Is this where render_partial comes in useful?
>
> P.S - I am not gathering any id''s from the database directly in
the
> select, it is just a local function for refreshing data on the page.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.