modalbox使用

需要引入的文件
<script language="javascript" type="text/javascript" src="/omsys2/html/review/js/bgiframe.js"></script>
<script language="javascript" type="text/javascript" src="/omsys2/html/review/js/modalbox.js"></script>
<link href="/omsys2/html/style/default/css/modalbox.css" rel="stylesheet" type="text/css" />


function showModal(tempObj) {

$.modalbox.show({
boxid:'box',
modal: true,
//contentType: 'html', // html selector url
// content: "<h1>这是内容</h1>", // 依据 contentType 而定
//contentType: 'selector', // html selector url
//content: "#dialog", // 依据 contentType 而定
width: 800,
height: 570,
contentType: 'url',
content: "reviewlist_search.html",
showCancel: false,
showOk: false,
title:'Please set search condition.',
showTitle: true,
onok:closebox,
okBtnName: 'OK',
cancelBtnName: 'Cancel',
// zIndex: 900,
onclose: null, // function 关闭后执行
onopen: null, // function, 只有返回true时才会显示窗口
//onok: null, // function 点击确定按钮后,窗口关闭前执行
oncancel: null // function 点击取消按钮后,窗口关闭前执行
});

}
function closebox(){
$.modalbox.close("box");
}
上面是父页面中弹出的modalbox的方法和关闭方法;
子页面中获取父页面中参数(只是做说明,具体还得看你传什么参数):
versionList = window.parent.versionList;
// alert(versionList);
// functionList = window.dialogArguments.functionList;
functionList = window.parent.functionList;
reviewConditionVO = window.parent.reviewConditionVO;
creator = window.parent.creator;


window.parent.result = getCondition();
//alert(window.parent.result);
//window.parent.close();
//dook;
window.parent.doOK();


父页面中dook方法:
function doOK()
{
设置你所需要的result值,完全根据需要来,result是从孩子页面中获得的参数
closebox();
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值