下拉列表框问题
这是三级联动的下拉列表框,我想将最后一个下拉列表的取值改为其它数据库,条件为 where entrycode like '%"&第二个下拉列表框的值&"%',但是不知怎么加第二个下拉列表的这个值,不知是该怎么取? <% <script language="javascript" >
function changelocation(locationid)
{
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from Tx_PrClass "
rs.open sql,conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[ <%=count%>] = new Array(" <%= trim(rs("class_name"))%>"," <%= trim(rs("ParentID"))%>"," <%= trim(rs("class_id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=Nothing
%>
onecount= <%=count%>;
document.form1.listRight.length = 0;
var locationid=locationid;
var i;
document.form1.listRight.options[0] = new Option('仪器品牌','1000','1000');
for (i=1;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.listRight.options[document.form1.listRight.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
function changelocation1(locationid)
{
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from Tx_PrClass "
rs.open sql,conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[ <%=count%>] = new Array(" <%= trim(rs("class_name"))%>"," <%= trim(rs("ParentID"))%>"," <%= trim(rs("class_id"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
set rs=Nothing
%>
onecount= <%=count%>;
document.form1.listRight1.length = 0;
var locationid=locationid;
var i;
document.form1.listRight1.options[0] = new Option('仪器型号','1000','1000');
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.listRight1.options[document.form1.listRight1.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<style type="text/css">
<!--
.style93 { COLOR: #ffffff
}
.Table8 {
padding-left: 0px;
padding-top: 0px;
padding-right: 0px;
padding-bottom: 0px;
font-variant: normal;
border:#CCCCCC 1px solid;
}
-->
</style>
<TABLE class=table1 cellSpacing=0 cellPadding=0 width=780 align=center bgColor=#ffffff border=0>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD bgColor=#666666 height=25> <SPAN class=style93> <FONT
color=#ffffff>您的位置: </FONT> <A
class=menu href="./"> <FONT
color=#ffffff>首页 </A> <FONT
color=#ffffff> >> 配件检索 </FONT> </SPAN> </TD> </TR>
<TR>
<TD bgColor=#d7dddd height=4> </TD> </TR> </TBODY> </TABLE>
<TABLE height="100%" cellSpacing=1 cellPadding=0 width="100%" align=center
bgColor=#ffffff border=0>
<TBODY>
<tr> <td colspan="5"> <span style="font-family: "宋体"; font-weight: bold; font-size: 12px">请选择: </span> </td>
</tr>
<FORM name=form1 action=products_list.asp method=post >
<TR bgcolor=#ffffff>
<TD height=23 > <%
Table_List="Tx_PrClass"
Set rs=server.createobject("Adodb.Recordset")
Sql="Select * from "& Table_List &" where ParentID=0 order by Class_Order ASC"
rs.open Sql,conn,1,1
P_C_N=split(Rs("Class_ParentPath"),"|")
P_C_N3=trim(Rs("Class_Id")) %>
<SELECT style="WIDTH: 150px; border: 1px solid #c2c2c2; " onchange="changelocation(document.form1.listLeft.options[document.form1.listLeft.selectedIndex].value)" id="listLeft"
name=listLeft >
<OPTION value="1000" selected>仪器类型 </OPTION>
<%
While not rs.eof
%>
<option value=" <%=rs("Class_Id")%>"> <%=rs("Class_Name")%> </option>
<%
rs.movenext
Wend
%>
<%
rs.close
set rs=Nothing
%>
</SELECT> </TD>
<TD width="200" height=23 align=middle>
<SELECT style="WIDTH: 150px;border: 1px solid #c2c2c2;" onchange="changelocation1(document.form1.listRight.options[document.form1.listRight.selectedIndex].value)" id=listRight
name=listRight>
<OPTION value="1000"selected>仪器品牌 </OPTION>
</SELECT>
</TD>
<TD width="190" height=23 align=middle >
<SELECT style="WIDTH: 150px;border: 1px solid #c2c2c2;" name="listRight1" id=listRight1>
<option selected value="1000">仪器型号 </option>
</SELECT> </TD>
<TR>