IE9中的白屏问题 - 删除iframe [英] Whitescreen issue in IE9 - Removing iframe

查看:80
本文介绍了IE9中的白屏问题 - 删除iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人能给我一些洞察我一直在努力解决的一个非常奇怪的IE9问题。

I"m wondering if anyone can give me some insight into a really strange IE9 issue I've been struggling with.

我正在完成一个工作站点 - 它在ff / chrome / ie7 / ie8中运行良好,没有脚本错误。

I'm finishing up production of a site for work - it works well in ff/chrome/ie7/ie8 with no script errors.

在IE9上,应用程序的最后一步导致整个选项卡被白屏用没有脚本错误或警告。(将文档模式更改为ie8将解决问题,但显然不适合生产)

On IE9 the last step of the application causes the entire tab to whitescreen with no script errors or warnings. (changing the document mode to ie8 will fix the problem but is obviously unsuitable for production)

不幸的是,网站相当复杂,有大量的ajax,和页内脚本所以我不能轻易地发布相关代码。我更想弄清楚如何诊断它。

Unfortunately the site pretty complex with a ton of ajax, and in-page scripts so I can't really post the relevant code easily. I'm more trying to figure out how to diagnose this.

我已经检查了IE错误日志并且它们都是空的.Web开发人员工具什么也没告诉我。该网站没有使用任何插件(Flash / Silverlight,Ect。)只是javascript w / jQuery。

I've checked the IE error logs and they are empty. Web developer tools tells me nothing. The site is not using any plugins (Flash/Silverlight, Ect. ) just javascript w/jQuery.

在失败的步骤周围的iframe中显示PDF - 但显示几乎相同的pdf d在上一步(使用相同的方法)没有问题。代码在调用jquery UI窗口时失败,但我似乎无法获得确切的行。

There is a PDF being displayed in an iframe around the step where it fails - but a nearly identical pdf is displayed in the previous step (using the same method) without problem. The code fails around a call to the jquery UI window but I can't seem to get the exact line.

如果有人知道如何进一步诊断这一点我真的很感激。我可以继续寻找虫子,但我以前从未见过这种行为,只是不确定我在寻找什么。

If anyone has a clue how to try to diagnose this further I'd really appreciate it. I can keep hunting for the bug but I've never seen this kind of behavior before and just am not sure what I am looking for.

推荐答案

感谢您的所有输入。抱歉,我完全被一些项目所淹没,所以我无法发布调试步骤的更新。

Thanks for all the input on this. Sorry I got completely overwhelmed by a few projects at once so I wasn't able to post updates on the debugging steps.

它花了很长时间但我终于意识到当我关闭包含第一个PDF的对话框时,一切都崩溃了。

It took forever but I finally realized that everything was crashing when I closed the dialog containing the first PDF.

我的一个辅助函数是打开对话框并在关闭时自动销毁内容。通常,这可以正常工作,因为我要么删除包含页面片段的div或iframe。

One of my helper functions was opening the dialog and automatically destroying the contents on close. Normally this works fine as I'm either removing a div containing the page fragment, or the iframe.

在这种情况下,我有一个页面片段加载到对话框中一些按钮和pdf iframe。我在包含iframe而不是iframe本身的父元素上调用了.remove()方法。出于某种原因,这似乎在其他所有浏览器中都能正常工作 - 但在IE9中,它几乎杀死了页面呈现而没有任何警告或消息。

In this situation I had a page fragment loaded into the dialog which contained some buttons and the pdf iframe. I called the .remove() method on the parent element containing the iframe rather than the iframe itself. For some reason this seems to work fine in every other browser - but in IE9 it pretty much kills the page rendering without any warning or message.

我强烈怀疑罪魁祸首是adobe插件,但我并不完全确定。

I strongly suspect that the culprit is the adobe plugin but I'm not entirely sure.

这是修复 -

Html:

Here is the fix-
Html:

<div id="container">
 <iframe src="loremipsum.pdf"></iframe>
</div>

Javascript:

Javascript:

//Ruins my entire week
$("#container").remove(); 

//Works as the pdf is removed directly
$("#container").find("iframe").remove().end().remove(); 

这篇关于IE9中的白屏问题 - 删除iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆