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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drop down list not limited to list

Status
Not open for further replies.

delorfra

Programmer
Mar 8, 2001
79
FR
Hi,

Is there any drop-down listbox (ActiveX, plugin ..) where the user can type in an item that is not listed in the list elements ? and also where you can type more than the first letter to find the correct item in the list ?

You know like the Visual Basic drop-down list.

Thanks
 
Try something like this:
Code:
<script language=&quot;JavaScript1.1&quot;>
function addToMenu(inForm) {
    var newText = inForm.theText.value;
    inForm.theMenu.options[inForm.theMenu.options.length] = new Option(newText,newText,true,true);
    }
</script>

<form name=&quot;theForm&quot; onSubmit=&quot;addToMenu(document.theForm)&quot;>
text: <input type=text name=&quot;theText&quot;><br>
<input type=&quot;button&quot; name=&quot;add&quot; value=&quot;Add -->&quot; onClick=&quot;addToMenu(document.theForm)&quot;> <select name=&quot;theMenu&quot; size=1></select>
</form>
(thread216-147706)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top