showdialog模态窗口中的POST方法

showdialog 在IE8中的post方法是打开一个新窗口,与火狐不同。所以如果在模态窗口里提交给后台的一些操作, 会造成不能控制关闭窗口的功能。解决办法是在<head></head>里加入<base target="_self" />.这样IE8里就好用了。

见如下代码:

ssa_list_content.cfm 写道
<script type="text/javascript" language="javascript">
function respond(e){
while(e.tagName != "TR")
{
e = e.parentNode;
}
var str = $(e).find("#lblACTVTYID").text();
var requsetIDStr = $(e).find("#lblRequsetID").text();
var result=window.showModalDialog('ssa_respond.cfm?ACTVTY_ID=' + str+'&REQT_ID='+requsetIDStr,'_blank','dialogWidth:500px;dialogHeight:500px;center:no;status:no');
if (result != null)
{
alert(result);
document.getElementById("formPostBackHandler").submit();
}

}
</script>
 
ssa_repond.cfm 写道
<head>
<base target="_self" />
</head>
 
ssa_gateway.cfc 写道
<script language="javascript">
window.returnValue = "Thank you for accepting the terms and conditions of the Single Service Agreement. You may now commence the Services in accordance with the terms and conditions of the Single Service Agreement.";
window.close();
</script>

 后台返回值给前台,result

window.returnValue 返回值

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值