I've done this type of thing using Javascript on the originating page:
(BTW: I'm not sure that fieldname.text is valid outside of IE.)
<script>
function saveValue(valNum) {
document.form[0].regionEmail.value =
document.form[0].region.options[valNum].text;
}
</script>
<input type="hidden" name="regionEmail">
<select name="region" onchange="saveValue(this.selectedIndex)">
<option...
</select>
> -----Original Message-----
> From: Les Mizzell [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, October 11, 2000 5:08 PM
> To: CF-Talk
> Subject: How to display Value and Label from listbox
>
> Trying to figure out how to format output for a listbox on a form, such as
> below:
>
> <select name="Region">
> <option value="[EMAIL PROTECTED]" selected>Africa</option>
> <option value="[EMAIL PROTECTED]">Asia & Pacific</option>
> <option value="[EMAIL PROTECTED]">Eastern South America</option>
> </select>
>
> On the action page, I can easily get the value to come up
>
> <CFOUTPUT>
> #Region#
> </CFOUTPUT>
>
> However, I need BOTH the value, and the Item Label to display, like:
>
> Region Email
> Africa [EMAIL PROTECTED]
>
> For processing purposes, I'm ONLY using the value (the email address) but
> for display purposes, and since there's close to 50 regions in the list, I
> need to see the label as well so the client will know if they selected the
> right region or not.
>
> That make any sense?
>
> Thanks!
>
> Les Mizzell
> ***********
> Some people say I'm too apathetic.
> But why should I care?
>
> --------------------------------------------------------------------------
> ----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
> http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in
> the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.