请问大神我的二级级联下拉列表的子体为何无法获得数据?谢谢!
<!--#include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>New Page 1</title>
</head>
<body>
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from LOAD_LIST"
rs.open sql,MM_LINE_CONN_STRING,1,1
%>
<SCRIPT language="JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= rs("LINE_NAME")%>","<%= rs("LINE_NAME")%>","<%= rs("LINE_NAME")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.form1.cid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.cid.options[document.form1.cid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT>
<SCRIPT language="javascript">
<!--
function CheckForm()
{
document.form1.txtcontent.value=document.form1.doc_html.value;
return true
}
//-->
</SCRIPT>
<form name=form1 onsubmit="check()">
景点类别<%
sql = "select * from LINE_ZONE"
rs.open sql,MM_LINE_CONN_STRING,1,1
if rs.eof and rs.bof then
response.write "请先添加景点类别!"
response.end
else
%>
<Select name="sid" onChange="changelocation(document.form1.sid.options[document.form1.sid.selectedIndex].value)" ><%
do while not rs.eof
%><OPTION selected value="<%=rs("LINE_NAME")%>"><%=rs("LINE_NAME")%></OPTION>
<%
rs.movenext
loop
end if
rs.close
%>
</Select>
景点列表<Select name="cid">
<OPTION selected value="">==请选景点==</OPTION>
</Select>
</form>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>New Page 1</title>
</head>
<body>
<SCRIPT language="JavaScript">
var onecount;
onecount=0;
subcat = new Array();
subcat[0] = new Array("金紫荆广场","金紫荆广场","金紫荆广场");
subcat[1] = new Array("会展中心","会展中心","会展中心");
subcat[2] = new Array("浅水湾","浅水湾","浅水湾");
subcat[3] = new Array("太平山凌霄阁","太平山凌霄阁","太平山凌霄阁");
subcat[4] = new Array("海洋公园","海洋公园","海洋公园");
subcat[5] = new Array("星光大道","星光大道","星光大道");
subcat[6] = new Array("黄大仙庙","黄大仙庙","黄大仙庙");
subcat[7] = new Array("珠宝(都会)","珠宝(都会)","珠宝(都会)");
subcat[8] = new Array("名表(时计宝)","名表(时计宝)","名表(时计宝)");
subcat[9] = new Array("百货(都会)","百货(都会)","百货(都会)");
subcat[10] = new Array("DFS","DFS","DFS");
subcat[11] = new Array("自由活动","自由活动","自由活动");
subcat[12] = new Array("迪士尼","迪士尼","迪士尼");
subcat[13] = new Array("青马大桥","青马大桥","青马大桥");
subcat[14] = new Array("文化中心","文化中心","文化中心");
subcat[15] = new Array("维多利亚港夜游","维多利亚港夜游","维多利亚港夜游");
subcat[16] = new Array("大钟楼","大钟楼","大钟楼");
subcat[17] = new Array("香港湿地公园","香港湿地公园","香港湿地公园");
subcat[18] = new Array("离港","离港","离港");
subcat[19] = new Array("谢瑞麟","谢瑞麟","谢瑞麟");
subcat[20] = new Array("尖东百货","尖东百货","尖东百货");
subcat[21] = new Array("双子星邮轮","双子星邮轮","双子星邮轮");
subcat[22] = new Array("国际免税中心","国际免税中心","国际免税中心");
subcat[23] = new Array("宝瓶星号邮轮","宝瓶星号邮轮","宝瓶星号邮轮");
onecount=24;
function changelocation(locationid)
{
document.form1.cid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.form1.cid.options[document.form1.cid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</SCRIPT>
<SCRIPT language="javascript">
<!--
function CheckForm()
{
document.form1.txtcontent.value=document.form1.doc_html.value;
return true
}
//-->
</SCRIPT>
<form name=form1 onsubmit="check()">
景点类别
<Select name="sid" onChange="changelocation(document.form1.sid.options[document.form1.sid.selectedIndex].value)" ><OPTION selected value="国内景点">国内景点</OPTION>
<OPTION selected value="港澳景点">港澳景点</OPTION>
<OPTION selected value="出境景点">出境景点</OPTION>
<OPTION selected value="台湾景点">台湾景点</OPTION>
</Select>
景点列表<Select name="cid">
<OPTION selected value="">==请选景点==</OPTION>
</Select>
</form>
</body>
</html>