0
Select me an item from a dropdown menu and place it next to the drop button
I have a button named "Seasons". When it is hovered it displays dropdown list with items: "Spring", "Summer", "Autumn", "Winter". I want to browser to display each item, when I click on it, and to place the item next to "Seasons" button. Anybody knows how?
1 Answer
+ 1
I would suggest using the onchange event to fire a javascript function
<select onchange="chkind()" id="myDropdownlist">,
and then get the selected value from the dropdown list
var e = document.getElementById("myDropdownlist");
var selectedItem= e.options[e.selectedIndex].value;
and then add the selectedItem var to your new dropdownlist, or button or whatever you want :p
I hope this helps you