Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

add to select box

Status
Not open for further replies.

discusmania

IS-IT--Management
Oct 24, 2000
158
AP
hello....
in select box , i want the user to be able to type, and at the same time able to choose from list if is already in the list, and add the new one if it is not in the list.

Thank you
 
You would have to have a separate select box and a text box. A user would type into the text box, and it would look through the values in the select box to see if it was there, and if so, make it the selected index.

If not, then you would have to maintain an array or collection of name/value pairs either in a database or in the session object. When they entered a value that wasn't in the select box, it would have to refresh the page and add the new value to the session object or database in ASP code at the top of the page. If you made it so that it pulled all values out of the database or session object to make the select box option tags, the new one would show up.

The problem with this is that using ASP you have to reload the page or submit to the same page in order to get the new value to show up in the select box. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
Harold,

You said in your post:

"The problem with this is that using ASP you have to reload the page or submit to the same page in order to get the new value to show up in the select box."

This is exactly what I want to do!!!! How in the select box could this be coded, so they could type a value in the same select box, and then submit the page and enter the value in the database? Or is this possible?

thanks,
Ray
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top