cannot reload page after user selection


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


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.