set rs1=server.CreateObject("adodb.recordset")
rs1.open "select * from products where bookid="&bookid,conn,1,1
rs.open "select * from bsort 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)">
<%
do while not rs.eof
%>
<option value="<%=rs("anclassid")%>" <%if rs1("anclassid")=rs("anclassid") then%>selected<%end if%>><%=trim(rs("anclass"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="Nclassid" id="Nclassid" onChange="changelocation1(document.myform.Nclassid.options[document.myform.Nclassid.selectedIndex].value)">
<%rs.open "select * from ssort where anclassid="&rs1("anclassid") ,conn,1,1
dim selclassid
selclassid=rs("nclassid")
do while not rs.eof%>
<option value="<%=rs("NclassID")%>" <%if rs1("nclassid")=rs("nclassid") then%>selected<%end if%>><%=rs("Nclass")%></option>
<% rs.movenext
loop
rs.close
set rs = nothing
%>
</select>
品牌:
<select name="pinpaiid">
<%
set rsa=server.createobject("adodb.recordset")
rsa.open "select * from pinpai where nclassid="&rs1("nclassid") ,conn,1,1
if not(rsa.eof and rsa.bof) then
do while not rsa.eof%>
<option value="<%=rsa("pinpaiid")%>" <%if rs1("pinpaiid")=rsa("pinpaiid") then%>selected<%end if%>><%=rsa("Nclass")%></option>
<% rsa.movenext
loop
end if
rsa.close
set rsa = nothing
%>
</select> </p></td>问题补充:
产品名称是这样的调用的:
<td width="266" STYLE='PADDING-LEFT: 10px'class=tdbg> <a href=editproducts.asp?id=<%=rs("bookid")%>>
<% if len(trim(rs("bookname")))>20 then
response.write left(trim(rs("bookname")),18)&".."
else
response.write trim(rs("bookname"))
end if%>
</a></td>