求助添加产品页面代码问题
<!--#include file="../Conn.asp" --><!--#include file="seeion.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<title>增加产品</title>
<script language="javascript">
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("hyeWebEditor/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>
<form name="add" method="post" action="add_products_pass.asp">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666">
<tr>
<td height="30" background="images/bg_list.gif"><div style="padding-left:10px; font-weight:bold; color:#FFFFFF">修改产品</div></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" >
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8" >
<td height="28" width="8%" class="td">产品标题 <font color="#FF0000">*</font></td>
<td class="td">
<input name="title" type="text" size="40" >
<label>
<input name="id" type="hidden" id="id" >
</label>
产品排序<input name="px_id" type="text" size="10" onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))" /> 数值越小,排列越靠前
</td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" 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.form1.BigClassID.options[document.form1.BigClassID.selectedIndex].value,document.form1)">
<option value="">请选择大类</option>
<%
i = 0
Set RsBig = Conn.Execute("SELECT * FROM BigClass ORDER BY px_id")
Do While Not RsBig.Eof
If i = 0 Then BigClassID = RsBig(0)
IF Cstr(rsa("BigClassID"))=Cstr(RsBig(0)) THEN SelectStr = " selected" ELSE SelectStr = ""
Response.Write("<option value='"&RsBig(0)&"'"& SelectStr &">"&RsBig(1)&"</option>")
i = i + 1
RsBig.MoveNext
Loop
RsBig.Close:Set RsBig = Nothing
%>
</select>
<select name="SmallClassID" id="SmallClassID">
<option value="">请选择小类</option>
<%
IF rsa("BigClassID")<>"" THEN
Set RsSmall = Conn.Execute("SELECT * FROM SmallClass WHERE BigClassID="&rsa("BigClassID"))
Do While Not RsSmall.Eof
IF Cstr(rsa("SmallClassID"))=Cstr(RsSmall(0)) THEN SelectStr = " selected" ELSE SelectStr = ""
Response.Write("<option value='"&RsSmall(0)&"'"& SelectStr &">"&RsSmall(1)&"</option>")
RsSmall.MoveNext
Loop
RsSmall.Close:Set RsSmall = Nothing
End IF
%>
</select> </td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">发布作者</td>
<td class="td"><%
exec="select * from admin where id="&session("admin")&" "
set rsn=server.createobject("adodb.recordset")
rsn.open exec,conn,1,1
%> <input name="zz" type="text" size="30" /></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">产品略缩图</td>
<td class="td"><input name=img type=text size=50>
<input type=button value="上传图片" onClick="showUploadDialog('image', 'form1.img', '')" class="btn"></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="25" class="td">产品价格</td>
<td class="td"><input name="jiage" type="text" size="20" > ¥</td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#FFFFFF'" bgcolor="#FFFFFF">
<td height="25" class="td">产品介绍 <font color="#FF0000">*</font></td>
<td class="td"><input type="hidden" name="body" value="">
<IFRAME ID="eWebEditor1" SRC="hyeWebEditor/ewebeditor.htm?id=body&style=popup" FRAMEBORDER="0" SCROLLING="no" WIDTH="600" HEIGHT="350"></IFRAME></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="13" class="td">是否推荐</td>
<td class="td"><label>
<input type="radio" name="tuijian" value="0" <%if rsa("tuijian")=0 then%>checked<%end if%>>不推荐
<input type="radio" name="tuijian" value="1" <%if rsa("tuijian")=1 then%>checked<%end if%>>推荐</label></td>
</tr>
<tr onmouseover="style.backgroundColor='#EEEEEE'" onmouseout="style.backgroundColor='#F1F5F8'" bgcolor="#F1F5F8">
<td height="12" class="td"> </td>
<td class="td"><input type="submit" name="button" id="button" value="确认修改" class="btn"/></td>
</tr>
</table>
</td>
</tr>
</table></form>
</body>
</html>
在一个不完整的源码里.后台添加产品代码问题.以上为自己补的代码,但是不能显示.不知为何.
[ 本帖最后由 故事人生 于 2010-8-28 21:08 编辑 ]