支付宝集成 index.asp怎么调用提交的表单啊?
index.asp
<!--#include file="alipayto/alipay_payto.asp"-->
<%
shijian=now()
dingdan=year(shijian)&month(shijian)&day(shijian)&hour(shijian)&minute(shijian)&second(shijian)
subject = "11"
body = "11"
out_trade_no = dingdan
price = "0.01"
quantity = "1"
discount = "0"
seller_email = seller_email
Set AlipayObj = New creatAlipayItemURL
itemUrl=AlipayObj.creatAlipayItemURL(subject,body,out_trade_no,price,quantity,seller_email)
response.Redirect(itemUrl)
%>
上面的红色的out_trade_no怎样获得我提交页面的订单号啊,还有price 怎样提取提交页面选择的价格啊
提交页面 buy.asp
<!--#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 res("Lin_dd2").value=1 then
response.write "<script language=javascript>alert('提交成功,请点击去支付宝交费');window.location='asp/index.asp';</script>"
else
response.write "<script language=javascript>alert('提交成功,可点下面帐号表格中的相应银行交费。');window.location='buy.asp';</script>"
end if
res.close
end if
%>