Combo box update in asp

tomjane11

New Member
what i want to do here is to load the pictures based on the option selected in the combo box. But when i am selecting "2011" from the combo box after the page reload the selected option is 2012 again..plz help me out....THIS IS MY ASP CODE\[code\]!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><<head><title>Sinhgad Alumni</title><script type="text/javascript"></script></head><link rel="stylesheet" type="text/css" href="http://stackoverflow.com/questions/12730257/theme/gallery.css"><body><%dim conn,rs,alumniyear,rs2 Response.write(alumniyear) Set conn=Server.createObject("ADODB.Connection") Set rs=Server.createObject("ADODB.Recordset") Set rs2 = server.createObject("ADODB.Recordset") conn.open="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &Server.MapPath("alumni.mdb") & "" rs.open "select * from alumni",conn %><div id="maincontent"><div class="show"><form name="form1" method="post"action="gallery.asp"><h2 style="font:20px SegoeUI, 'Segoe UI', arial, sans-serif;margin: 0 auto;width: 300px;">Pictures of alumni in year:<select name="drpyear" style="margin: 0 auto;width: 150px;height: 30px;text-align: center" onChange="javascript: document.forms['form1'].submit()" ><%while NOT rs.EOF%><option onclick="javascript: document.forms['form1']"><%response.write(rs("alumniyear"))%></option><%rs.MoveNext%><%wend%></select></h2></form><ul id="gallery"><%alumniyear=Request("drpyear")rs2.open "select * from gallery where alumni='"&alumniyear&"'",connif rs.EOF then%><li><img height="200"width="200" src=http://stackoverflow.com/questions/12730257/<%response.write(rs2("link"))%>></li><%else%><%while NOT rs2.EOF%><li><img height="200"width="200" src=http://stackoverflow.com/questions/12730257/<%response.write(rs2("link"))%>></li><%rs.MoveNextWENDend ifconn.CloseSet conn =Nothing%></ul></div>`\[/code\]
 
Back
Top