From: Dan Thomas Date: 2011-01-25T17:45:31+09:00 Subject: dynamic drop down menu based on xml data I'm new to ruby, html and javascript (ouch). In an erb file I am reading a value from an xml. Then I need to display a drop down menu where THAT one is selected. For now I am just hard coding all the possible selections in html. So for example see below, "animation_asset" may come back as being equal to "Animation 2", in which case the html selection component would like like below. But how do I do this dynamically? What if it comes back as "Animation 1". I'm thinking I may need some javascript. I have called hello-world javascript through buttons, so I have some javascript functions in my html doc already. I'm just not sure what to call and what to return. Thanks. <%animation_asset = pathElementsArray[assetPos] # say it is equal to "Animation 2"%> -- Posted via http://www.ruby-forum.com/.