# Master select list changes contents of slave select lists

**URL:** <https://www.ruby-forum.com/t/master-select-list-changes-contents-of-slave-select-lists/202635>\
**Category:** Ruby\
**Created:** [February 2, 2011, 7:59pm UTC](https://www.ruby-forum.com/t/master-select-list-changes-contents-of-slave-select-lists/202635 "2011-02-02T19:59:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 2, 2011, 7:59pm UTC](https://www.ruby-forum.com/t/master-select-list-changes-contents-of-slave-select-lists/202635/1 "2011-02-02T19:59:16Z")

</div>

I have one drop-down list (call it master) that needs to change the  
contents of other drop down lists (slaves). Really, its changing which  
item is “selected” or on top of the slave lists, but same idea.

Can this be done with Ruby and html? Would I need some sort of  
on\_change listener on the master? And then a way to change the  
“selected” attribute on the slaves?

I am using Ruby and Sinatra.

Any help, or key words to look up, greatly appreciated. I have only a  
few weeks experience on Ruby and HTML. Thanks.
