很抱歉再次提出同样的问题,似乎没有人知道,我真的需要答案。
大家好,有人可以告诉我一旦关闭Thickbox后如何激活一个功能,我们将非常感激。
function tb_remove() {
window.parent.pageUpdate();// << this is what i have tried
$("#TB_imageOff").unbind("click");
$("#TB_closeWindowButton").unbind("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
}
火狐说:
Error: window.parent.pageUpdate is not a function
Source File: https://web111.secure-secure.co.uk/snowyswebsolutions.co.uk/scripts/js/thickbox.js
Line: 270
答案 0 :(得分:0)
这应该有效,前提是父窗口有一个“pageUpdate”方法。
然而,由于跨域javascript限制,如果iframe实际上正在加载另一个域,则无法执行此操作。
如果不是这种情况,看看你是否可以提供更多信息(网址?),我会看看是否可以发现任何其他信息。
答案 1 :(得分:0)
url: 'https://web111.secure-secure.co.uk/snowyswebsolutions.co.uk/pageIncludes/' + page + '.php',
使用https可能那会是个问题吗?并且函数pageUpdate()是否也必须加载到iframe中或仅加载到父级中?非常感谢您的回复。