Microsoft VBScript 运行时错误 错误 '800a01a8' 缺少对象: ''

wuming88888 2009-05-06 02:55:09
<!--#include file="conn.asp" -->
<FORM id=aspnetForm name=aspnetForm
onsubmit="javascript:return WebForm_OnSubmit();" action=buy.asp method=post>
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}
//]]>
</SCRIPT>
<SCRIPT src="imanges/WebResource.axd" type=text/javascript></SCRIPT>
<SCRIPT src="imanges/WebResource(1).axd" type=text/javascript></SCRIPT>

<SCRIPT language=javascript type=text/javascript>
function cal()
{
if (theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList2.value=='2')
{
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxOther.value=30;
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxAmount.value=theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList1.value*1+30;
}
else if (theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList2.value=='9')
{
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxOther.value=0;
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxAmount.value=Math.round(theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList1.value*1/7)+25+'美元' ;
}
else
{
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxOther.value=0;
theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_TextBoxAmount.value=theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList1.value*1;
}
}
</SCRIPT> <SCRIPT type=text/javascript>
//<![CDATA[
function WebForm_OnSubmit() {
if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
return true;
}
//]]>
</SCRIPT>

<%
act=request("act")
if act="add" then
set res=server.createobject("adodb.recordset")
sql="select * from Lin_dingdan"
res.open sql,conn,1,3
res.addnew
res("Lin_dd1")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$DropDownList1")
res("Lin_dd2")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$DropDownList2")
res("Lin_dd3")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxOther")
res("Lin_dd4")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxAmount")
res("Lin_dd5")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxName")
res("Lin_dd6")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxTel")
res("Lin_dd7")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxAddr")
res("Lin_dd8")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxZip")
res("Lin_dd9")=request("ctl00$ctl00$ContentPlaceHolder1$ContentPlaceHolderMain$TextBoxComments")
res.update

if theForm.ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList2.value=1 then
response.write "<script language=javascript>alert('请点击去支付宝交费');window.location='buy.asp';</script>"
else
response.write "<script language=javascript>alert('提交成功,可点下面帐号表格中的相应银行交费。');window.location='buy.asp';</script>"
end if
res.close
end if

红字的哪行报错 说Microsoft VBScript 运行时错误 错误 '800a01a8' 缺少对象: '' 求救
%>
...全文
547 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wuming88888 2009-05-06
  • 打赏
  • 举报
回复
呵呵,谢谢,解决了
  • 打赏
  • 举报
回复
ctl00_ctl00_ContentPlaceHolder1_ContentPlaceHolderMain_DropDownList2有错
poemGao 2009-05-06
  • 打赏
  • 举报
回复
d
Atai-Lu 2009-05-06
  • 打赏
  • 举报
回复
asp获取表单值是这么获取的?
用request("表单名")的方式吧?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧