function OpenDialogUrl(id, title, url, width, height, okValue, okfun, cancelValue, cancelfun) {
var d = {}; if (okValue != undefined) {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height,
ok: okfun,
okValue: okValue
});
} else if (cancelValue != undefined) {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height,
ok: okfun,
okValue: okValue,
cancel: cancelfun,
cancelValue: cancelfun
});
} else {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height
});
} d.showModal();
}这个插件要怎么用啊。
//增加一条信息
function Add() {
top.OpenDialogUrl("add", "新增", "/Home/AddPage", 500, 750);
//window.location.reload();
}
我想post提交后关闭对话框后刷新页面,但这样写,直接点击就刷新了,求大神解答下。。
var d = {}; if (okValue != undefined) {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height,
ok: okfun,
okValue: okValue
});
} else if (cancelValue != undefined) {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height,
ok: okfun,
okValue: okValue,
cancel: cancelfun,
cancelValue: cancelfun
});
} else {
d = dialog({
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height
});
} d.showModal();
}这个插件要怎么用啊。
//增加一条信息
function Add() {
top.OpenDialogUrl("add", "新增", "/Home/AddPage", 500, 750);
//window.location.reload();
}
我想post提交后关闭对话框后刷新页面,但这样写,直接点击就刷新了,求大神解答下。。
url: "@Url.Action("Create")",
type: "Post",
data: $("form").serialize(),
dataType: "json",
success: function (data) {
if (data.type == 1) {
window.location.reload(); //post成功了,刷新
}
else {
alert('没成功,出错了');
}
}
});
var attachDialog = top.dialog({
title: "请选择大屏位置" ,
url: '../dialog/dialog_bigScreen_position.aspx?articleid=' + obj,
width: 500,
height: 200,
onclose: function () {
location.href = location.href;
}
}).showModal();
}
id: id,
fixed: true,
title: title,
url: url,
width: width,
height: height
});这个里面肯定有一些事件供你配置,比如bootstraptable中就有onloadsuccess,这样子
title: '提示',
content: '按钮回调函数返回 false 则不许关闭',
okValue: '确定',
ok: function () {
this.title('提交中…');
return false;
},
cancelValue: '取消',
cancel: function () {}
});