jQuery MiniUI

 找回密码
 立即注册
查看: 3844|回复: 4
打印 上一主题 下一主题

mini.open bug [复制链接]

Rank: 2

跳转到指定楼层
楼主
发表于 2013-11-28 14:58:46 |只看该作者 |倒序浏览
mini.open({
                url: "http://www.baidu.com",
                title: "新增角色",
                width: 800,
                height: 600,
                allowResize: false,
                showModal: false,
                onload: function () {
                    var iframe = this.getIFrameEl();
                    var data = { action: "new" };
                    //iframe.contentWindow.SetData(data);
                },
                ondestroy: function (action) {
                    var iframe = this.getIFrameEl();
                    debugger;
                    var data = iframe.contentWindow.GetData(),
                           data1 = mini.clone(data);    //必须。克隆数据。
                    alert(data1);


                }
            });
点关闭按钮,不会执行ondestroy

Rank: 8Rank: 8

沙发
发表于 2013-11-28 15:47:41 |只看该作者
我们正在处理

Rank: 8Rank: 8

板凳
发表于 2013-11-28 15:59:47 |只看该作者
跨域的情况下.用onbuttonclick来处理关闭之后的操作
onbuttonclick: function (e) {
                    if (e.button.name == "close") {
                        alert(1);
                    }
                }
不要用ondestory

Rank: 2

地板
发表于 2013-11-28 17:25:56 |只看该作者
factory 发表于 2013-11-28 15:59
跨域的情况下.用onbuttonclick来处理关闭之后的操作
onbuttonclick: function (e) {
                    i ...

跨域的情况下,我点击button关不了窗口
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
      <script type="text/javascript" src="miniui/jquery-1.8.3.js"></script>
     <link href="miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
     <script type="text/javascript" src="miniui/miniui.js"></script>
</head>
<body >
<input type="button"  class="mini-button" value="关闭" id="btid" onclick="btclose()" />   
</body>
</html>
<script type="text/javascript">
function btclose()
{
if (window.CloseOwnerWindow) return window.CloseOwnerWindow('close');
                else window.close();
}
</script>

Rank: 8Rank: 8

5#
发表于 2013-11-29 09:21:33 |只看该作者
你贴的代码是可以关闭的
如果你有具体的例子,请直接打包放上来,高级模式可以上传。

Archiver|普加软件

GMT+8, 2025-7-14 23:04 , Processed in 1.062868 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部