Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何制作;模态构象;此函数调用中的功能?_Javascript_Jquery_Html_Jquery Ui_Modal Dialog - Fatal编程技术网

Javascript 如何制作;模态构象;此函数调用中的功能?

Javascript 如何制作;模态构象;此函数调用中的功能?,javascript,jquery,html,jquery-ui,modal-dialog,Javascript,Jquery,Html,Jquery Ui,Modal Dialog,当我在脚本中调用下面的函数时,我将得到一个弹出对话框来执行一些说明 以下是我的示例代码: function updateStatus(instrxnID){ exporter.fn.childWindow({ instrxnID : instrxnID, url:'pgks/fund/update/view.page' },'pgks','Popup',{top:100,height:

当我在脚本中调用下面的函数时,我将得到一个弹出对话框来执行一些说明

以下是我的示例代码:

function updateStatus(instrxnID){
            exporter.fn.childWindow({
                instrxnID : instrxnID,
                url:'pgks/fund/update/view.page'
            },'pgks','Popup',{top:100,height:459,width:884,left:200});
        }
exporter.fn.childWindow将调用以下函数打开弹出窗口'

childWindow : function(elements,path,title,setting){
        setting = setting != undefined ? setting : {top:100,height:300,width:400,left:200};
        var keys = exporter.fn.keys(elements);
        var offset = "width="+setting.width+",height="+setting.height+",top="+setting.top+",left="+setting.left;
        myWin = open("", "displayWindow", offset+",scrollbars=no,status=no,dependent=yes,directories=no,menubar=no,personalbar=no");
        myWin.document.open();
        myWin.document.write("<html><head>");
        myWin.document.write("</head><body><form name='form' action='"+elements.url+"' type='post'>");
        for ( var a = 0; a < keys.length; a++) {
            myWin.document.write('<input type="hidden" name="'+keys[a]+'" value="'+elements[keys[a]]+'">');
        }
        myWin.document.write("</form><script type='text/javascript'>form.method=\'post\';form.submit();</script></body></html>");
        myWin.document.close();
    }
childWindow:函数(元素、路径、标题、设置){
设置=设置!=未定义?设置:{顶部:100,高度:300,宽度:400,左侧:200};
var key=exporter.fn.key(元素);
var offset=“width=“+setting.width+”,height=“+setting.height+”,top=“+setting.top+”,left=“+setting.left;
myWin=open(“,”displayWindow“,offset+”,滚动条=no,状态=no,依赖关系=yes,目录=no,菜单栏=no,个性化栏=no”);
myWin.document.open();
myWin.document.write(“”);
myWin.document.write(“”);
对于(var a=0;a
完成这些说明后,我应该返回到这个弹出窗口的主页面或父页面

注意:通过点击背景页面或其他链接,此模式不应消失


示例:我需要实现如下功能

将单击处理程序附加到提交按钮,或将提交处理程序附加到表单。在此处理程序中,隐藏(
display:none;
)弹出窗口,或者,如果您使用窗口对象作为弹出窗口,则在实例上调用
.close()

编辑:


将单击处理程序附加到提交按钮,或将提交处理程序附加到表单。在此处理程序中,隐藏(
display:none;
)弹出窗口,或者,如果您使用窗口对象作为弹出窗口,则在实例上调用
.close()

编辑:


你在找确认弹出窗口?模态将使用多少种不同的方式?@RichPeck:我只需要确认弹出窗口,所以你在寻找确认弹出窗口?模态将被使用多少种不同的方式?@RichPeck:我只需要确认弹出窗口,你能举例说明如何使用click handler或submit handler来编写此代码吗?你没有提供足够的信息来提供确切的代码,但我可以给你基本的想法。我至少需要一些html来说明这一点。你能举例说明如何使用click handler或submit handler来编写这段代码吗?你没有提供足够的信息来提供确切的代码,但我可以告诉你基本的想法。我需要至少一些html来使这个具体化。
$(".my-button").on("click", function() {
  myWin.close();
});