Jump to content
Sign in to follow this  

Dynamic Drop Down Select box

Recommended Posts

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...????

Share this post

Link to post
Share on other sites

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

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...