alwaysvaghu Posted November 5, 2005 Share Posted November 5, 2005 Dynamic Drop Down Select boxHello Friends....I want to cretae dynamic dropdown select box....like....when it should save entered value in drop down list and also allow usto enter new value if it is not in the list.....How can I do that...???? Link to comment Share on other sites More sharing options...
Jack McKalling Posted November 6, 2005 Share Posted November 6, 2005 (edited) 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>: selectbox_name.options[index]To choose the index number of the selected option: selectbox_name.selectedIndexTo choose the selected option of a <select>: selectbox_name.options[selectbox_name.selectedIndex]To choose the visible name of the selected option: selectbox_name.options[selectbox_name.selectedIndex].textTo choose the invisible value of the selected option: selectbox_name.options[selectbox_name.selectedIndex].valueTo 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 November 6, 2005 by Dan The Prof Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now