Ultima Posted November 15, 2011 Share Posted November 15, 2011 I'm wondering how I would change the order of these options by clicking on them. I assume make some kind of function with variables that set a negative or positive increment, I just don't really know how to write it out. So like a "move selected option up or down via a button". <select name="available" size=10 ><option value=1>Hanlen Ball Handling<option value=2>4 corner passing<option value=3>Product Updates<option value=4>Product Specifications<option value=5>Order History<option value=6>Order Status<option value=7>Contacts<option value=8>Calendar of Events<option value=9>Scheduler<option value=10>Notes</select>Okay, so I don't put the pressure on everyone having to code this for me, I am just going to ask how I change the order of let's say 'option's. Link to comment Share on other sites More sharing options...
justsomeguy Posted November 15, 2011 Share Posted November 15, 2011 You'll remove it from the list, and then add it back at a different place. http://www.w3schools.com/jsref/dom_obj_select.asp The select object has a property for the selected index and the list of options, so you can use that to get the option and save it, then remove it, then add it again at a different index. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.