can anybody help me?
i have 2 radio boxes
Categories: 1.Music 2.Sport
after selecting one, i need to load subcategories to drop-down menu
which located on the same rhtml page. and refresh it.
notice: i can access to subcategories using this syntax.
<%= f.select :category_id ,Category.find_all_by_type(“Sport”).collect
{|p| [ p.name, p.id ] }%>
or
<%= f.select :category_id ,Category.find_all_by_type(“Music”).collect
{|p| [ p.name, p.id ] }%>
but I have to make it dynamic drop-down menu.