开发者

Rails 3.1 interdependent select dropdown lists

开发者 https://www.devze.com 2023-04-03 09:13 出处:网络
My database structure: Countries(id,title,prefix) Towns(id,country_id,title) Street(id,town_id,title) I need to create开发者_开发技巧 interdependent select dropdown list: when i select Country, aja

My database structure:

Countries(id,title,prefix)  
Towns(id,country_id,title)
Street(id,town_id,title)

I need to create开发者_开发技巧 interdependent select dropdown list: when i select Country, ajax loading towns from this country into select tag, and when i select Street, ajax loading street by selected town_id into street select tag. I want to ask whether there is a Rails way to generate this list. Thank you.


I found some tutorial to make what you want :

  • dependant dropdowns menus

  • cascading menu

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号