The recordset is on the same asp page as the comboboxes.
Also another thing:
My combobox is like this:
<select onchange="BLOCKED SCRIPT__StyleChanged()" name="PopulateStyle" size="1" style="width:400px">
<option value="0~">No Style Selected</option>
<%
While not rsStyle.EOF
%>
<option value="<%=rsStyle("Style_Name")%>"><%=rsStyle("Style_Name")%>
</option>
<%
rsStyle.MoveNext
WendIf rsStyle.State = adStateOpen Then rsStyle.Close
Set rsStyle= nothing
%>
You see that I display the Style_name and the value is the style_name.
I want to change this so the value will be a StyleID from the recordset and I still want to display the Style_Name to the user, but after this I need to know how to get both the Style_Name and the Style_Id.
I will use the selected STyle_Id to filter the second recordset and then I want to bind this recordset to the second combobox.
I have a Javascript function now that gets the .value which is now the Style_Name so I know if I change the value to be StyleID then it will get that, so I know how to change that.
But I also need to know the javascript syntax to get the style_name or selected value, what is the syntax for that? Is it something like option[s].selected?
What I have now is this, this gets the value. How do you get the selected text? (it must be something similar to this):
var vl;
vl = document.frmSend.PopulateStyle.options[s].value;