javascript - dropdown for search suggestions with prompting -
I have a script that provides suggestions for an input field on which the user is typing a letter in the input field is. It uses functions to make suggestions in delimited using HTML:
& lt; Body & gt; & Lt; Form & gt; First name: & lt; Input type = "text" onkeyup = "showHint (this.value)" size = "20" /> & Lt; / Form & gt; & Lt; P & gt; Suggestion: & lt; Span id = "txthint" & gt; & Lt; / Span & gt; & Lt; / P & gt; & Lt; / Body & gt; Now I want to use a drop down box instead of the suggestion string. I think I need to put in the input field and the selection option in a divan, but I do not understand how to get it into the input field after it is selected. How do i do this
You can get the value attribute (or text node) of the selected option and store it in the input box Please.
$ (& lt; input & gt;) value (basicview + "," + $ (& lt; select & gt;) .val ()); The second way to suggest as a jQuery autocomplete @DemianBrecht is to find if you are looking to create more feature-wide interfaces.
Comments
Post a Comment