求错误Microsoft VBScript 运行时错误 错误 '800a01a8' 的解?
Microsoft VBScript 运行时错误 错误 '800a01a8' 缺少对象: ''
/admin/addbook.asp,行 109
代码如下:
<!--#include file="conn.asp"-->
<%if session("shopv8admin")<>"" then
response.Write "<script LANGUAGE='javascript'>alert('网络超时或者您还没有登录请登录');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>2 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if
%>
<html><head><title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/css.css" rel="stylesheet" type="text/css">
</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_Nclass order by Nclassidorder ",conn,1,1%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= rs("anclassid")%>","<%= rs("Nclassid")%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.Nclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{ //这句不是很理解
document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<body>
<table class="tableBorder" width="90%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
<tr >
<td align="center" background="images/admin_bg_1.gif" height="25"><b><font color="#ffffff">添加新商品</font></b> </td>
</tr>
<tr >
<form name="myform" method="post" action="库/saveaddbook.asp?action=add" OnSubmit="return checkkk()" >
<td>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ffffff">
<tr >
<td width="30%" align="right">选择商品的分类:</td>
<td width="70%">
<%
rs.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
大类:
<select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option selected value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
<% dim selclass
selclass=rs("anclassid")
rs.movenext
do while not rs.eof
%>
<option value="<%=rs("anclassid")%>"><%=trim(rs("anclass"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select>
小类:
<select name="Nclassid">
<%rs.open "select * from shop_Nclass where anclassid="&selclass ,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
<% rs.movenext
do while not rs.eof%>
<option value="<%=rs("NclassID")%>"><%=rs("Nclass")%></option>
<% rs.movenext
loop
end if
rs.close
set rs = nothing
%>
</select>
</td>
</tr>
<tr >
<td align="right"> </td>
<td width="70%"> <%
rs2.open "select * from shop_anclass order by anclassidorder",conn,1,1
if rs2.eof and rs2.bof then
response.write "请先添加栏目。"
response.end
else
%>
大类:
<select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<option selected value="<%=rs("anclassid2")%>"><%=trim(rs2("anclass"))%></option>
<% dim selclasss
selclasss=rs2("anclassid")
rs2.movenext
do while not rs2.eof
%>
<option value="<%=rs("anclassid2")%>"><%=trim(rs("anclass"))%></option>
<%
rs2.movenext
loop
end if
rs2.close
%>
</select>
小类:
<select name="Nclassid">
<%rs2.open "select * from shop_Nclass where anclassid="&selclasss ,conn,1,1
if not(rs2.eof and rs2.bof) then
%>
<option selected value="<%=rs("NclassID2")%>"><%=rs("Nclass")%></option>
<% rs2.movenext
do while not rs2.eof%>
<option value="<%=rs("NclassID2")%>"><%=rs("Nclass")%></option>
<% rs2.movenext
loop
end if
rs2.close
set rs2 = nothing
%>
</select> </td>
</tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=1 ",conn,1,1
%>
<input type="text" name="mch" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td><input name="bookname" type="text" id="bookname" size="30"> 浮动价:
<select name="fudongjia" size=1>
<%set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from shop_fudong order by id ",conn,1,1
if rs_s.recordcount=0 then
response.write "请先添加浮动价"
else
while not rs_s.eof
%>
<option value=<%=rs_s("id")%> ><%=rs_s("shuoming")%></option>
<%
rs_s.movenext
wend
end if%>
</select>
</td>
</tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=2 ",conn,1,1
%>
<input type="text" name="pp" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td><input name="pingpai" type="text" id="pingpai">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from pingpai order by pingpaiorder ",conn,1,1
%>
<select name="select" onchange="(document.myform.pingpai.value=this.options[this.selectedIndex].value)">
<option selected>请选择品牌</option>
<%
while not rs_s.eof
%>
<option value="<%=rs_s("pingpainame")%>"><%=rs_s("pingpainame")%></option>
<%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=3 ",conn,1,1
%>
<input type="text" name="isbn1" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td><input name="isbn" type="text" id="isbn"></td>
</tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=4 ",conn,1,1
%>
<input type="text" name="jj" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td> <input name="bookchuban" type="text" id="bookchuban" size="7">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from danwei order by danweiorder ",conn,1,1
%>
<select name="select" onchange="(document.myform.bookchuban.value=this.options[this.selectedIndex].value)">
<option selected>请选择单位</option>
<%
while not rs_s.eof
%>
<option value="<%=rs_s("danweiname")%>"><%=rs_s("danweiname")%></option>
<%
rs_s.movenext
wend
rs_s.close
set rs_s=nothing
%>
</select>
</td>
</tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=5 ",conn,1,1
%>
<input type="text" name="jg" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td>
市场价:<input name="shichangjia" type="text" id="shichangjia" size="6" onKeyPress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
会员价:
<input name="huiyuanjia" type="text" id="huiyuanjia" size="6" onKeyPress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
VIP价:
<input name="vipjia" type="text" id="vipjia" size="6" onKeyPress = "return regInput(this, /^\d*\.?\d{0,2}$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^\d*\.?\d{0,2}$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^\d*\.?\d{0,2}$/, event.dataTransfer.getData('Text'))">
</td></tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=6 ",conn,1,1
%>
<input type="text" name="zl" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td>
库存数:<input name="kucun" type="text" id="kucun" value="0" size="6" onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))" >
已销售:
<input name="chengjiaocount" type="text" id="chengjiaocount" value="0" size="6" onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))" readonly>
积 分:
<input name="yeshu" type="text" id="yeshu" value="0" size="6" onKeyPress = "return regInput(this, /^[0-9]*$/, String.fromCharCode(event.keyCode))"
onpaste = "return regInput(this, /^[0-9]*$/, window.clipboardData.getData('Text'))"
ondrop = "return regInput(this, /^[0-9]*$/, event.dataTransfer.getData('Text'))" >
</td></tr>
<tr >
<td align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=7 ",conn,1,1
%>
<input type="text" name="tp" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td>
<input name="bookpic" type="text" id="bookpic" size="30">
<input type="button" name="Submit2" value="上传小图片" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=bookpic&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr >
<td></td>
<td>
<input name="zhuang" type="text" id="zhuang" size="30">
<input type="button" name="Submit2" value="上传大图片" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=zhuang&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr>
<td height="4"><div align="right">配置图片上传:</div></td>
<td height="4" colspan="2"><input name="p1" type="text" id="p1" size="30" class="wenbenkuang">
<input type="button" name="Submit22" class="go-wenbenkuang" value="上传配置图片一" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=p1&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr>
<td rowspan="3"><div align="right">注: 商品配置图片共四张,上传后显示在商品介绍内,如不上传即不显示</div></td>
<td height="2" colspan="2"><input name="p2" type="text" id="p2" size="30" class="wenbenkuang">
<input type="button" name="Submit23" class="go-wenbenkuang" value="上传配置图片二" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=p2&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
</tr>
<tr>
<td colspan="2"> <input name="p3" type="text" id="p3" size="30" class="wenbenkuang">
<input type="button" name="Submit24" class="go-wenbenkuang" value="上传配置图片三" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=p3&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')">
</td>
</tr>
<tr>
<td height="5" colspan="2"><input name="p4" type="text" id="zhuang52" size="30" class="wenbenkuang">
<input type="button" name="Submit25" class="go-wenbenkuang" value="上传配置图片四" onClick="window.open('../situjiaduotu.asp?formname=myform&editname=p4&uppath=bookpic&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')"></td>
</tr>
<tr >
<td valign="top" align="right">
<%
set rs_s=server.createobject("adodb.recordset")
rs_s.open "select * from ziduan where ziduanorder=8 ",conn,1,1
%>
<input type="text" name="nr" size="12" value="<%=rs_s("ziduanname")%>">
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td>
<textarea name="bookcontent" cols="46" rows="8" id="bookcontent"></textarea>
</td>
</tr>
<tr >
<td></td>
<td height="30">
<input name="newsbook" type="checkbox" id="bestbook" value="1">
新 品 <input name="bestbook" type="checkbox" id="bestbook" value="1">
推 荐 <input name="tejiabook" type="checkbox" id="bestbook" value="1">
特 价
</td>
</tr>
<tr >
<td></td>
<td height="30">
<input type="submit" name="Submit" value=" 添加保存 ">
<input onclick="ClearReset()" type=reset name="Clear" value=" 重新填写 ">
</td>
</tr>
</table>
</td>
</form>
</tr>
</table>
<!--#include file="copyright.asp"-->
</body>
</html>
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkkk()
{
if(checkspace(document.myform.bookname.value)) {
document.myform.bookname.focus();
alert("请输入商品名称!");
return false;
}
if(checkspace(document.myform.shichangjia.value)) {
document.myform.shichangjia.focus();
alert("请输入市场价格!");
return false;
}
if(checkspace(document.myform.huiyuanjia.value)) {
document.myform.huiyuanjia.focus();
alert("请输入会员价格!");
return false;
}
if(checkspace(document.myform.vipjia.value)) {
document.myform.vipjia.focus();
alert("请输入VIP会员价格!");
return false;
}
}
function checkspace(checkstr) {
var str = '';
for(i = 0; i < checkstr.length; i++) {
str = str + ' ';
}
return (str == checkstr);
}
//-->
</script>
<script>
function regInput(obj, reg, inputStr)
{
var docSel = document.selection.createRange()
if (docSel.parentElement().tagName != "INPUT") return false
oSel = docSel.duplicate()
oSel.text = ""
var srcRange = obj.createTextRange()
oSel.setEndPoint("StartToStart", srcRange)
var str = oSel.text + inputStr + srcRange.text.substr(oSel.text.length)
return reg.test(str)
}
</script>