I am new to ror. I want to show ‘Dynamic drop down for subcategory based
on ‘On change’ of category’ and below is the code I used. But I can make
the sub category drop doen to be filtered based on category. Please any
one suggest…
list.rhtml
Category Name
<%=
collection_select(:categories,:id,@categories,:id,:category_name,
{:onChange => "new Ajax.Updater('subcategories','update_subcategories/'
+ this[this.selectedIndex].value,{asynchronous:true,
evalScripts:true});"})%>
I am new to ror. I want to show ‘Dynamic drop down for subcategory
based
on ‘On change’ of category’ and below is the code I used. But I can’t
make
the sub category drop down to be filtered based on category. Please any
one suggest…
list.rhtml
Category Name
<%=
collection_select(:categories,:id,@categories,:id,:category_name,
{:onChange => "new Ajax.Updater('subcategories','update_subcategories/'
+ this[this.selectedIndex].value,{asynchronous:true,
evalScripts:true});"})%>