...

View Full Version : pulling face value from list options



JackFruit3D
08-05-2002, 02:41 AM
Mind my ingorance...
I have a drop down list which is similar to as follows:

<Input......>
<option Value="001">Red</Option>
<option Value="002">Blue</Option>
<option Value="003">Green</Option>
<option Value="004">Purple</Option>
....

i only want to grab the face (name of the color) value... not the actual value to the selected option, then simpley drop it into a text box.

boywonder
08-05-2002, 03:05 AM
check this out...

<form>
<select name="tst">
<option Value="001">Red</Option>
<option Value="002">Blue</Option>
<option Value="003">Green</Option>
<option Value="004">Purple</Option>
</select>
<input type="button" value="test" onClick="alert(this.form.tst[this.form.tst.selectedIndex].text);">
</form>

It's the text property you're after...
good luck

JackFruit3D
08-05-2002, 03:14 AM
5w33t

thanx

:D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum