Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/82.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
使用jquery.simpleModel中的iframe,在弹出窗口关闭时重新加载iframe var pt_popup_options={}; 函数pt\u popup\u iframe(sURL,sOkFunction) { pt_popup_okfunction=sOkFunction; $(“pt#u msgBox”).css('width','700px'); $(“#pt#msgBox”).css('heigth','500px'); $(“#pt_msgBox>p”).html(“”); $(“#pt#u msgBox”).modal(pt#u弹出窗口选项); }_Jquery_Iframe_Simplemodal - Fatal编程技术网

使用jquery.simpleModel中的iframe,在弹出窗口关闭时重新加载iframe var pt_popup_options={}; 函数pt\u popup\u iframe(sURL,sOkFunction) { pt_popup_okfunction=sOkFunction; $(“pt#u msgBox”).css('width','700px'); $(“#pt#msgBox”).css('heigth','500px'); $(“#pt_msgBox>p”).html(“”); $(“#pt#u msgBox”).modal(pt#u弹出窗口选项); }

使用jquery.simpleModel中的iframe,在弹出窗口关闭时重新加载iframe var pt_popup_options={}; 函数pt\u popup\u iframe(sURL,sOkFunction) { pt_popup_okfunction=sOkFunction; $(“pt#u msgBox”).css('width','700px'); $(“#pt#msgBox”).css('heigth','500px'); $(“#pt_msgBox>p”).html(“”); $(“#pt#u msgBox”).modal(pt#u弹出窗口选项); },jquery,iframe,simplemodal,Jquery,Iframe,Simplemodal,当通过关闭按钮或弹出窗口右上角的“x”关闭弹出窗口时,iframe将重新加载并向服务器发出请求。它不应该这样做。有没有办法防止这种情况?我使用的是Chrome和jQuery 1.4.2 谢谢大家! 似乎与以下各项有关: var pt_popup_options = {}; function pt_popup_iframe(sURL, sOkFunction) { pt_popup_okfunction = sOkFunction; $("#pt_msgBox").css('wi

当通过关闭按钮或弹出窗口右上角的“x”关闭弹出窗口时,iframe将重新加载并向服务器发出请求。它不应该这样做。有没有办法防止这种情况?我使用的是Chrome和jQuery 1.4.2

谢谢大家!

似乎与以下各项有关:

var pt_popup_options = {};

function pt_popup_iframe(sURL, sOkFunction)
{
    pt_popup_okfunction = sOkFunction;
    $("#pt_msgBox").css('width', '700px');
    $("#pt_msgBox").css('heigth', '500px');
    $("#pt_msgBox > p").html('<iframe style="width: 696px; height: 496px;" src="' + sURL + '"></iframe>');
    $("#pt_msgBox").modal(pt_popup_options);
}

$(“#pt_msgBox>p”).html(“”);
$(“#pt#u msgBox”).modal(pt#u弹出窗口选项);
$('pt_msgBox').find('iframe').attr('src',sURL);

如果您正在使用jQueryUI的对话框,另一个选项是,我不久前编写了一个扩展,用于处理对话框中的各种iFrame问题


我也有同样的问题

最简单的修复方法是设置
persist
选项

$(“#pt_msgBox”).modal({persist:true})

自SimpleModel-1.3.5起

persist:(Boolean:false)跨模式调用持久化数据?只有 用于现有DOM元素。如果为true,将保留数据 跨模式调用,如果为false,则数据将还原为其 原始状态


$("#pt_msgBox > p").html('<iframe style="width: 696px; height: 496px;"></iframe>');
$("#pt_msgBox").modal(pt_popup_options);
$('#pt_msgBox').find('iframe').attr('src', sURL);