If you''re talking about refreshing the entire page, then
you''ve got to do
something with the onChange event:
<select ... onChange="javascript:document.location='' <%=
url_for ... %> '';"
...>
There might be a plugin somewhere with these kinds of helpers, but I
don''t
know of any off the top of my head.
For the record: Ajax calls cannot completely refresh a page in this manner.
Jason
On 12/4/06, Peter Cutting
<peter.cutting-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
>
> Hi
>
> I want to reload the page when a user selects a new value from a drop-down
> <select>.
>
> I would have thought this was a common use-case but I cannot find a single
> example of how to do it on the web (or AgWebDevfRails).
>
> All the examples I have found so far, update a specific <div> useing
> observe_field or Ajax.Updater (but I want to reload the page).
>
> According to the documentation, the observe_field :update parameter is
> optional, but there is no explanation of what this means.
>
> I would expect that not specifying :update indicates that the whole page
> is
> to be reloaded but this does not seem to be the case. (My controller fires
> but the page does not get reloaded)
>
> Any help much appreciated
>
> Peter
>
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---