1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is this code doing

Discussion in 'C#' started by vb89, Sep 22, 2008.

  1. #1
    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):

    SEMrush
     
    vb89, Sep 22, 2008 IP
    SEMrush
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    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
     
    dimitar christoff, Sep 22, 2008 IP
  3. Sleeping Troll

    Sleeping Troll Peon

    Messages:
    217
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    It is populating an options list for a select form from a database.
     
    Sleeping Troll, Sep 22, 2008 IP