Click to See Complete Forum and Search --> : HELP! how to Request.Form listbox Value & Label


HEADSTRONG
09-09-2005, 10:04 AM
I have a page that has a listbox control, the list has a Label and Value for each item.
once the page is submited I am trying to use "REQUEST.FORM("Listboxname") to get the selected value, I get the value ok BUT I also need the LABEL.

How do I request the selected VALUE & LABEL from a listbox

thanks for your help :confused:

gRoberts
09-09-2005, 12:03 PM
I think you'd have to use jscript for this, I know with .net you can set the text and value, but with request.form all your getting is what that form has been told to send.

When you submit, you can send the data as a querystring, and use jscript to get the details you require.

Gav

HEADSTRONG
09-09-2005, 11:21 PM
I guess I don't know how to get the LABEL
I know I can get the value of the selected item with listbox.Value
but how do I get the label. listbox.label? does not work

for example what I was trying to do is copy the label to a textbox and then request the listbox and the textbox, but I don't know how to get the label

if I use this it will copy the selected VALUE to the uidtxt textbox
onChange="this.form.uidtxt.value = this.value

But I also need the LABEL
onChange="this.form.uidtxt.value = this.label
this gives me undifined


I'm mising something
thanks