showModalDialog拒绝访问,求大神指点
function jgqrAfter() {
var userid = window.showModalDialog("UISelectUser.aspx", '选择用户', 'dialogWidth:450px;dialogHeight:250px;center:yes;help:no;resizable:no;status:no'); //打开模态子窗体,并获取返回值
if (userid != undefined && (userid != "")) {
var dm = document.getElementById("cgrk_id").value;
var ckdstatus = $('#cgrk_status').combobox('getValue');
$.ajax({
url: './handler/delHandler.ashx?id=&type=sentDownWithUser' + "&cgrkjg_dh=" + dm + "&userid=" + userid + "&ckdstatus=" + ckdstatus,
success: function (result) {
var rst = eval("(" + result + ")");
if (rst.msg == "OK") {
alert('加工确认成功!');
var newurl = document.URL.split('?')[0] + "?id=" + dm;
window.navigate(newurl);
} else if (rst.msg == "NotSuccess") {
alert("加工确认失败!");
} else if (rst.msg == "HasSent") {
alert("不允许重复下发给当前选择用户!");
}
}
});
} else {
//alert("下发失败!");
}
}
打开模态窗口执行时报拒绝访问,页面另一个地方调用同一个模态窗口可以打开
var userid = window.showModalDialog("UISelectUser.aspx", '选择用户', 'dialogWidth:450px;dialogHeight:250px;center:yes;help:no;resizable:no;status:no'); //打开模态子窗体,并获取返回值
if (userid != undefined && (userid != "")) {
var dm = document.getElementById("cgrk_id").value;
var ckdstatus = $('#cgrk_status').combobox('getValue');
$.ajax({
url: './handler/delHandler.ashx?id=&type=sentDownWithUser' + "&cgrkjg_dh=" + dm + "&userid=" + userid + "&ckdstatus=" + ckdstatus,
success: function (result) {
var rst = eval("(" + result + ")");
if (rst.msg == "OK") {
alert('加工确认成功!');
var newurl = document.URL.split('?')[0] + "?id=" + dm;
window.navigate(newurl);
} else if (rst.msg == "NotSuccess") {
alert("加工确认失败!");
} else if (rst.msg == "HasSent") {
alert("不允许重复下发给当前选择用户!");
}
}
});
} else {
//alert("下发失败!");
}
}
打开模态窗口执行时报拒绝访问,页面另一个地方调用同一个模态窗口可以打开
...全文
相关推荐
使用selenium测试showModalDialog模态对话框
){" + "selenium.browserbot.getCurrentWindow().showModalDialog = function( sURL, vArguments, sFeatures
showModalDialog:window.showModalDialog polyfill 使用元素
本文介绍了showModalDialog方法的三种polyfill实现方式,包括使用yield、async/await和eval。展示了如何在不支持该方法的环境中模拟其行为,并提供了相关JavaScr
javascript showModalDialog 内跳转页面的问题
关于在使用JavaScript的showModalDialog函数中实现页面内跳转的问题,首先需要了解showModalDialog的用途和特性。
window.showModalDialog的基本用法
showModalDialog**:打开的是模态对话框,即在对话框未关闭之前,用户无法与主窗口进行交互。
showModalDialog
"showModalDialog"是JavaScript中的一个古老但仍然有用的弹出窗口方法,用于在浏览器环境中打开一个新的对话窗口。


