PDA

Click to See Complete Forum and Search --> : Drop Down List


parkes
Nov 7th, 2000, 05:56 AM
I've got a drop down list with some values in it. What I want to be able to do is when I select an option from the list put a value in another field on the screen.

How is this done. I think its done with the onChange command, but I cannot get it to work!

Please help

dadames
Nov 7th, 2000, 09:48 AM
This is a javascript version. For VB, replace the "this" with the dropdown list box name...

<select name="cboCust" size="1" ONCHANGE="this.form.hidCustName.value = this.options[this.selectedIndex].text" tabindex="1">

<%' Fill the combo box however you like %>
<OPTION value="whatever"> <font size="2">whatever</font> </OPTION>
<OPTION value="who"> <font size="2">who</font> </OPTION>
</select>

<%' this field should display selection from dropdown%>
<input type="text" name="hidCustName" value="">

Let me know if you run into problems.