繁体   English   中英

面板在 IE 8 和 IE o 上不刷新

[英]Panel is not refreshing on IE 8 and IE o

嗨,我有一个问题,代码在 IE8 和 IE9 上不起作用,但可以使用更高版本和其他浏览器(如 chrome)。 该页面不会仅在 IE8 和 IE9 上重新加载。

当我在单选按钮上选择 1 个选项时我正在做的场景。 面板应该重新加载。

这是我的java代码。

ProfileBasePage.java

// Javascript used to resize the Modal page after hiding/showing components.
Public static String POPUP_RELOAD_JS =
"var iFrame = window.parent.document.getElementsByTagName('iframe')[0];"
+ "(iframe.onload)();";

/** Calls the Javascript code to reload the modal panel only when the popup parameter is set to true.*/
protected void reloadPopupiFrame(AjaxRequestTarget target)
{

//POPUP_PARAMETER="popup"

    String popup = getRequest().getRequestParameters().getParameterValue(ProfileBasePage.POPUP_PARAM_KEY).toString();

//TRUESTRING = "true"
    //append the javascript used to reload the modal iFrame.
    if(ProfileBasePage.TRUESTRING.equalsIgnoreCase(popup))
{
target.appendJavaScript(POPUP_RELOAD_JS);
}
}

如果您使用 Wicket ModalWindow类,您可以使用 Wicket 自己的 JavaScript 命令调整它的大小:

target.appendJavaScript("window.parent.Wicket.Window.current.autoSizeWindow();");

(iframe.onload)()看起来很可疑。 也许较旧的 IE 版本不支持它。 最好改用适当的函数调用。 即你的 iframe 应该看起来像: <iframe onload="myOnLoadOrResizeHandler()"...>然后 Wicket 执行的 JS 代码应该是: target.appendJavaScript("myOnLoadOrResizeHandler();")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM