Drop-down after radio box

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.

not a radio box but a select box. im sure it can be modified to work for
radio box.

this worked for me awesomely.

http://rails.techno-weenie.net/forums/2/topics/767

just cut and paste java script code, and modify the model for your
model.