下拉菜单不听使唤了--急!在线等--
第一个下拉菜单可以顺利调动后面的小菜单但第二个就无法调用了!
请高手帮忙!小弟刚学呀
<td width="30%" align="right">选择商品的分类:</td>
<td width="70%">
<%
rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
大类:
<select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
<% dim selclass
selclass=rs("anclassid")
rs.movenext
do while not rs.eof
%>
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="Nclassid">
<%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
<% rs.movenext
loop
end if
rs.close
set rs = nothing
%>
</select>
</td>
</tr>
<tr >
<td align="right"> </td>
<td align="right">
<div align="left">
<%set rs2=server.createobject("adodb.recordset")
rs2.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs2.eof and rs2.bof then
response.write "请先添加栏目。"
response.end
else
%>
大类:
<select name="select1" size="1" id="select1" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option selected value="<%=rs2("anclassid")%>"><%=trim(rs2("anclass"))%></option>
<% dim selclass2
selclass2=rs2("anclassid")
rs2.movenext
do while not rs2.eof
%>
<option value="<%=rs2("anclassid")%>"><%=trim(rs2("anclass"))%></option>
<%
rs2.movenext
loop
end if
%>
</select>
小类:
<select name="select2">
<%set rs3=server.createobject("adodb.recordset")
rs3.open "select * from shop_Nclass where anclassid="&selclass2 ,conn,1,1
if not(rs3.eof and rs3.bof) then
%>
<option selected value="<%=rs3("NclassID")%>"><%=rs3("Nclass")%></option>
<% rs3.movenext
do while not rs3.eof%>
<option value="<%=rs3("NclassID")%>"><%=rs3("Nclass")%></option>
<% rs3.movenext
loop
end if
rs3.close
set rs3 = nothing
%>
</select>
</div></td>