Dependent collection select

Hello people

I’m developing a rails 3.0.9 app with jquery and I need to perform
this issue. If I select a value from a collection select (Region),
another collection select (cities) should populate based on the
selected value from the first one.

I was following this example
http://www.petermac.com/rails-3-jquery-and-multi-select-dependencies/
but in the example they are using “semantic_form_for” and I’m just
using “form_for” so, when I load the form and I choose a region, the
other select box is populated and i can choose the city, at this point
everything works perfect… the problem is… I can’t save the form.

When I press the submit button, nothing happens (no submiting, no
error messages, nothing at all), the page gets stuck.

Does anyone know how to work with dependent select boxes in rails??

Hope you can help me… Thanks

On 15 December 2011 22:06, Angelo C. [email protected] wrote:

other select box is populated and i can choose the city, at this point
everything works perfect… the problem is… I can’t save the form.

When I press the submit button, nothing happens (no submiting, no
error messages, nothing at all), the page gets stuck.

Is there anything special about the submit button code or is it a
standard submit?

When you say there is no submit, have you looked in the rails log to
see whether there is anything there.

Copy the complete html of the page from the browser (view > Page
Source or similar) and paste it into the w3c html validator to check
that the html is valid.

If still no joy run the page in firefox with firebug enabled and see
if there are any errors.

If you reply here make sure you answer all the above issues, to save
them being asked again.

Colin