<script language=javascript>
function ch(selectedids,n)
{
var selectedvalue=selectedids
var i
var t=0
document.form1.s2.length=0
for(i=0;i<n;i++)
{
if(subcat[i][0]==selectedvalue)
{
document.form1.s2.options[t]=new
datacheck()">
<table width="100%" border="0">
<tr bgcolor="#E6E0FE">
<td width="12%" align="center">物品类别
</td>
<td colspan="6">
<script language="javascript">
var subcat=new Array()
<%
dim n
n=0
set rs=server.CreateObject("adodb.recordset")
rs.ActiveConnection=conn
rs.Source="select a.T_catid,a.T_name as xx ,a.T_id from cos_T_manage a
join cos_T_catagery b on a.T_catid=b.T_id"
rs.CursorType=1
rs.LockType=1
rs.Open
do while not rs.EOF%>
subcat[<%=n%>]=new
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = " select ChanelId,ChanelName,ChanelParentId from Chanel where ChanelParentId<>0 and ChanelVis=true"rs.open sql,connstr,1,1%>
<script language="JavaScript">
var tempcount;
tempcount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
temparr[<%=count%>] = new Array("<%= trim(rs("ChanelName"))%>","<%= trim(rs("ChanelParentId"))%>","<%= trim(rs("ChanelId"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
tempcount=<%=count%>;
function changeit(itid)
{
document.form1.smallclassid.length = 0;
var itid=itid;
var i;
for (i=0;i < tempcount; i++)
{
if (temparr[i][1] == itid)
{
document.form1.smallclassid.options[document.form1.smallclassid.length] = new Option(temparr[i][0], temparr[i][0]);
}
}
}
</script>
<%
sql = "select ChanelId,ChanelName from Chanel where ChanelParentId=0 and ChanelVis=true"
rs.open sql,connstr,1,1
if rs.eof and rs.bof then
response.write "请先添加主栏目"
response.end
else
%>
<select name="bigclassid" id="bigclassid" onChange="changeit(document.form1.bigclassid.options[document.form1.bigclassid.selectedIndex].value)">
<option selected value="">选择主栏目</option>
<% do while not rs.eof %>
<option value="<%=trim(rs("ChanelId"))%>"><%=trim(rs("ChanelName"))%></option>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
</select>
<select id="smallclassid" name="smallclassid" >
<option selected value="">选择子栏目</option>
</select>