Can someone please explain to me what exactly is happening in this code... <SELECT name="cf" class="data" onchange="this.form.cftxt.value=this.options[this.selectedIndex].text;"> <OPTION value="">Select Conference</OPTION> <%tempDivId = 0 Set rsConf = SPSSconn.Execute(tConfSQL) Do While Not rsConf.eof tempConfId = CInt(rsConf(0)) If (tempDivId <> CInt(rsConf("cfb_division_id"))) Then If (CInt(rsConf("cfb_division_id")) = 1) Then Response.Write "<OPTION value="""">-------- Division I-A ----------</OPTION>" Else Response.Write "<OPTION value="""">-------- Division I-AA ----------</OPTION>" End If tempDivId = CInt(rsConf("cfb_division_id")) End If %> <OPTION value="<%=tempConfId%>" <%If iConfID = tempConfId Then%>selected<%End If%>><%=rsConf(1)%> (<%=rsConf(2)%>)</OPTION> <%rsConf.movenext Loop rsConf.close Set rsConf = Nothing%> Code (markup):
this is asp, not javascript - wrong forum. looks like it's populating and grouping select options from a DB call and picking a selected one. gl