Jump to content

Dynamic Drop Down Select box


Recommended Posts

A program that can do that, would be difficult (but possible). But I can tell you how to edit an option of a selectbox.Each option consists of both a "value" (if added) and "text" (the text visible in the list). The value of the selected option will be the value of the selectbox when submitted.To choose the options of a <select>:

To choose the index number of the selected option:
To choose the selected option of a <select>:
To choose the visible name of the selected option:
To choose the invisible value of the selected option:
To modify the visible text of an option:
selectbox_name.options[selectbox_name.selectedIndex].text = "user_input"
Replace the greens by the correct form names.Replace the blue by the index number you want, beginning with '0'.I hope this helped :) Edited by Dan The Prof
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...