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

--
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@googlegroups.com.
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.

Search Discussions

  • Colin Law at Dec 16, 2011 at 9:45 am

    On 15 December 2011 22:06, Angelo Cordova wrote:
    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.
    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

    --
    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@googlegroups.com.
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedDec 15, '11 at 10:06p
activeDec 16, '11 at 9:45a
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Angelo Cordova: 1 post Colin Law: 1 post

People

Translate

site design / logo © 2021 Grokbase