itchyII
MIS
- Apr 10, 2001
- 167
Hi Everyone,
I am trying to retrieve both the value and the text of a select box (this data will be placed in an email and sent). I know how to get the value of the select box but I can't seem to find anywhere how to get the text as well. Is it possible. Here is a snippit of my code...
My VBscript statement:
strSurveyOne = Trim(Request.Form("selSurveyOne")) & Empty
'this gets the value just fine...but no text
My HTML code:
<SELECT tabindex = "1" style="WIDTH: 175px" name="selSurveyOne" onchange=addComment("commentOne",this.options[this.selectedIndex].value)>
<OPTION value = "" selected>Please select</OPTION>
<OPTION value = 5>Always</OPTION>
<OPTION value = 4>Frequently</OPTION>
<OPTION value = 3>Sometimes</OPTION>
<OPTION value = 2>Never</OPTION> <OPTION value = 1>No Comment</OPTION>
</SELECT>
So basically, if the user has selected 'Frequently', I want strSurveyOne to contain "4 - Frequently". Can it be done without an enormous amount of code?
Thanks,
ItchyII
I am trying to retrieve both the value and the text of a select box (this data will be placed in an email and sent). I know how to get the value of the select box but I can't seem to find anywhere how to get the text as well. Is it possible. Here is a snippit of my code...
My VBscript statement:
strSurveyOne = Trim(Request.Form("selSurveyOne")) & Empty
'this gets the value just fine...but no text
My HTML code:
<SELECT tabindex = "1" style="WIDTH: 175px" name="selSurveyOne" onchange=addComment("commentOne",this.options[this.selectedIndex].value)>
<OPTION value = "" selected>Please select</OPTION>
<OPTION value = 5>Always</OPTION>
<OPTION value = 4>Frequently</OPTION>
<OPTION value = 3>Sometimes</OPTION>
<OPTION value = 2>Never</OPTION> <OPTION value = 1>No Comment</OPTION>
</SELECT>
So basically, if the user has selected 'Frequently', I want strSurveyOne to contain "4 - Frequently". Can it be done without an enormous amount of code?
Thanks,
ItchyII