读书人

好手们二级菜单为什么不能联动

发布时间: 2012-08-29 08:40:14 作者: rapoo

高手们,二级菜单为什么不能联动
<!--#include file="../xyconn.asp" -->
<!--#include file="seeion.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>企业添加产品</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
font-size:12px;
}
.button{font-size:12px; background:url(button.gif); border:1px solid #BDC5CA; height:23px; color:#333333}
.STYLE1 {font-size: 12px}
.STYLE3 {font-size: 12px; font-weight: bold; }
.STYLE5 {color: #FF0000}
-->
</style>
<script language="javascript">
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("xyeWebEditor/dialog/i_upload.htm?style=popup&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window,

"dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");}
</script>
<script language = "JavaScript">
<%
Set Rs = Server.CreateObject("Adodb.Recordset")
Rs.Open "SELECT * FROM SmallClass ORDER BY SmallClassID asc",conn,1,1
%>
var onecount;
onecount=0;
subcat = new Array();
<%
i = 0
Do While Not Rs.eof
%>
subcat[<%=i%>] = new Array("<%= Trim(Rs("SmallClassName"))%>","<%= Rs("BigClassID")%>","<%= Rs("SmallClassID")%>");
<%
i = i + 1
Rs.MoveNext
Loop
Rs.Close
%>

onecount=<%=i%>;

function changelocation(locationid,formname)
{
formname.SmallClassID.length = 0;

var locationid = locationid;
var i;
for (i = 0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
formname.SmallClassID.options[formname.SmallClassID.length] = new Option(subcat[i][0], subcat[i][2]);
}
}

}
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="images/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="30"><img src="images/tab_03.gif" width="12" height="30" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%"><div align="center"><img src="images/tb.gif" width="16" height="16" /></div></td>
<td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>:[网站企业产品添加页面]</td>
</tr>


</table></td>
<td width="54%"> </td>
</tr>
</table></td>
<td width="16"><img src="images/tab_07.gif" width="16" height="30" /></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="images/tab_12.gif"> </td>
<td>
<form name="form" method="post" action="add_products.asp?act=ok">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8" >
<td height="28" width="8%" class="td">产品标题</td>
<td width="92%" class="td">
<input name="title" type="text" size="40" />
<label> <img src="images/ts.gif" width="14" height="15" alt="产品内容标题" /></label></td>
</tr>
<tr onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td width="8%" height="13" class="td">产品分类</td>
<td class="td"><select name="bigclassid" id="bigclassid" onChange="changelocation(document.form.bigclassid.options

[document.form.bigclassid.selectedIndex].value,document.form)">
<option value="">请选择大类</option>
<%
i = 0
Set rsbig = conn.execute("select * from bigclass order by pl_id")
do while not rsbig.Eof
If i = 0 Then bigclassid = RsBig(0)
Response.Write("<option value="""&rsbig(0)&""">"&rsbig(1)&"</option>")
i = i + 1
rsbig.MoveNext
Loop
Set rsbig = Nothing
%>
</select>
<select name="smallclassid" id="smallclassid" >
<option value="">请选择小类</option>
<% If bigclassid <> "" Then
Set rssmall = conn.execute("select * from smallclass where bigclassid = "&bigclassid)
do while not rssmall.eof
response.write("<option value="""&rssmall(0)&""">"&rssmall(1)&"</option>")
rssmall.movenext
loop
end if
set rssmall = nothing
%>
</select></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">发布作者</td>
<td class="td"><%
exec="select * from admin_user where id="&session("admin")&" "
set rsn=server.createobject("adodb.recordset")
rsn.open exec,conn,1,1
%> <input name="zz" type="text" value="<%=rsn("admin")%>" size="30" /></td>
</tr>
<tr onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">


<td height="25" class="td">产品略缩图</td>
<td class="td"><input type=text name=img size=50> <input type=button value="上传图片" onClick="showUploadDialog('image', 'form.img', '')" class="button"></td>
</tr>
<tr onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">店铺链接地址</td>
<td class="td"><input type=text name=shopurl size=50></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">市场价</td>
<td class="td"><label>
<input name="scj" type="text" size="10" />
元</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">现 价</td>
<td class="td"><label>
<input name="xj" type="text" size="10" />
元</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">品 牌</td>
<td class="td"><label>
<input name="ppai" type="text" size="10" />
</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">产品型号</td>
<td class="td"><label>
<input name="xh" type="text" size="20" />
[如:E72i]
</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">颜 色</td>
<td class="td"><label>
<input name="ys" type="text" size="10" />
[如:黑色]
</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">产品产地</td>
<td class="td"><label>
<input name="cpcd" type="text" size="40" />
</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">内容介绍</td>
<td class="td"><INPUT type="hidden" name="body" value="">
<iframe id="eWebEditor1" src="xyeWebEditor/ewebeditor.htm?id=body&style=popup" frameborder="0" scrolling="no" width="600" height="350"></iframe></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">


<td height="13" class="td">是否推荐</td>
<td class="td"><label>
<input name="tuijian" type="radio" value="0" checked="checked" />不推荐
<input type="radio" name="tuijian" value="1" />推荐 </label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">是否特卖</td>
<td class="td"><label>
<input name="tm" type="radio" value="0" checked="checked" />不是
<input type="radio" name="tm" value="1" />是</label></td>
</tr>
<tr onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="12" class="td"> </td>
<td class="td"><input type="submit" name="button" id="button" value="确认提交" class="button"/></td>
</tr>
</table>
</form>
</td>
<td width="8" background="images/tab_15.gif"> </td>
</tr>
</table></td>
</tr>
<tr>


[解决办法]
代码太长!
[解决办法]
这个解决了吗

读书人网 >ASP

热点推荐