From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 09, 2004 4:07 PM
Subject: OT: option id
> Can anyone tell me how to get the value of an option id?
>
> Example:
> <select name="modelname">
> <option id="23" value="Pl23">P123</option>
> </select>
>
> Of course, when I output modelname on the next page I get the value, put I
> also need to get the id. Is this possible?
You won't be able to get the ID on the form's action page.
easiest thing to do would be append it to the value creating a comma
delimited list:
<select name="modelname">
<option id="23" value="P123,23">P123</option>
</select>
now on the action page you can do:
ID: #listLast(form.modelname)#
Value: #listFirst(form.modelname)#
other alternative would be to populate a hidden field via _javascript_ using
the onchange event handler in the <select> tag.
Charlie
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

