I have put together the code below to create dependant dropdown boxes. Can anyone help me with some javascript so the page works the same but doesn't refresh every time a dropdown box changes? I am relatively new to javascript so the more spefic the better. ThanksBairdb
<%set object=Server.CreateObject("ADODB.recordset")sql="SELECT DISTINCT REGN_NM FROM 2005_SSP ORDER BY REGN_NM"object.Open sql,connREGN_NM=Trim(request("regn_nm"))%><a href="Test.asp">Refresh</a><form method="get" action="Test.asp">Region <select name="regn_nm" onchange="submit();"><% do until object.EOF response.Write("<option") If object.fields("regn_nm") = regn_nm then response.write(" selected") end if response.Write(">") response.Write(object.fields("Regn_NM")) object.Movenextloopobject.Closeset object=Nothing%> </select><%If regn_nm<>"" thensql="SELECT DISTINCT SALES_ST_NM FROM 2005_SSP WHERE REGN_NM='"& regn_nm &"' ORDER BY SALES_ST_NM"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,connSALES_ST_NM=Trim(request("sales_st_nm"))%>Sales St<select name="sales_st_nm" onchange="submit();"><% do until object.EOF response.Write("<option") If object.fields("sales_st_nm") = sales_st_nm then response.write(" selected") end if response.Write(">") response.Write(object.fields("sales_st_nm")) object.Movenextloopobject.Closeset object=Nothing%></select><%End If%><%If sales_st_nm<>"" thensql="SELECT DISTINCT DST_CD FROM 2005_SSP WHERE SALES_ST_NM='"& sales_st_nm &"' ORDER BY DST_CD"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,connDST_CD=Trim(request("dst_cd"))%>Distict <select name="dst_cd" onchange="submit();"><% do until object.EOF response.Write("<option") If object.fields("dst_cd") = dst_cd then response.write(" selected") end if response.Write(">") response.Write(object.fields("dst_cd")) object.Movenextloopobject.Closeset object=Nothing%></select><%End If%></form><%If dst_cd<>"" thensql="TRANSFORM Sum([2005_SSP].PREMIUM_TOTAL) AS SumOfPREMIUM_TOTAL SELECT [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD, [2005_SSP].LGCY_LINE_TYP_DESC FROM 2005_SSP WHERE Dst_Cd='"& dst_cd &"' GROUP BY [2005_SSP].REGN_NM, [2005_SSP].SALES_ST_NM, [2005_SSP].DST_CD, [2005_SSP].LGCY_LINE_TYP_DESC PIVOT [2005_SSP].YR_MO;"set object=Server.CreateObject("ADODB.Recordset")object.Open sql,conn%><table width="100%"><tr><th>Region</th><th>Sales State</th><th>District</th><th>Line</th><th>Jan</th><th>Feb</th><th>Mar</td><th>Apr</td><th>May</td><th>Jun</td><th>Jul</td><th>Aug</td><th>Sep</td></tr><%do until object.EOF%><tr><%for each x in object.Fields%><td><%Response.Write Ucase(x.value)%></td><%nextobject.MoveNext%></tr><%loopobject.close%></table>