I am trying to convert already populated dropdownlist to a single textbox via javascript or jQuery but cant figure it out!
I would like to remove/change The “Select” to “td” element resulting the value in this case “9100” would be displayed in the textbox and not the Drop-down list.
You probably ask why I am doing this, but the answer is quite complicated becouse of dynamic HTML construction.
Is there any way abovementioned problem can be solved via Jquery or javascript? Thanx in advance !
<td class="mainstuff" style="padding-right:0; width:1%; ">
<select id="stuff" class="boxed" title="" name="stuff">
<option value="9100" title="Something:">9100</option>
</select>
</td>
You can do this
See the demo on jsFiddle.net
You can tweak it according to your requirement.
Hope this helps you.