IE9的JavaScript错误:SCRIPT5007:无法获得属性“UI”的值:对象为null或undefined [英] IE9 JavaScript error: SCRIPT5007: Unable to get value of the property 'ui': object is null or undefined

查看:358
本文介绍了IE9的JavaScript错误:SCRIPT5007:无法获得属性“UI”的值:对象为null或undefined的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站运行良好在Chrome,Firefox和Internet Explorer 8的但在Internet Explorer 9中,当只有将鼠标悬停在组件触发非常奇怪的错误。

My website works well on Chrome, Firefox, and Internet Explorer 8. But on Internet Explorer 9, very weird errors are triggered when just hovering over components.

SCRIPT5007:无法获得属性UI的值:对象为null或undefined
  ScriptResource.axd?d=sTHNYcjtEdStW2Igkk0K4NaRiBDytPljgMCYpqxV5NEZ1IEtx3DRHufMFtEMwoh2L3771sigGlR2bqlOxaiwXVEvePerLDCL0hFHHUFdTOM0o55K0&t=ffffffffd37cb3a1,行181字1914年

SCRIPT5007: Unable to get value of the property 'ui': object is null or undefined ScriptResource.axd?d=sTHNYcjtEdStW2Igkk0K4NaRiBDytPljgMCYpqxV5NEZ1IEtx3DRHufMFtEMwoh2L3771sigGlR2bqlOxaiwXVEvePerLDCL0hFHHUFdTOM0o55K0&t=ffffffffd37cb3a1, line 181 character 1914

和遵循的JavaScript的链接错误表明我code的这些位:

And following the link to the error in the javascript shows me these bits of code:

onNodeOver:function(B,A){A.ui.onOver(B)},onNodeOut:function(B,A){A.ui.onOut(B)}

我在如何去解决这个错误有点无能。
我见过<一个href=\"http://forums.asp.net/t/1672835.aspx/1?CollapsiblePanel%20not%20working%20on%20hosted%20server\">this解决方案,但没有解决我的问题。

I'm a little clueless on how to go about solving this error. I've seen this solution but that didn't solve the problem for me.

任何想法?

推荐答案

很多JavaScript库(尤其是非近期的)不处理IE9很好,因为它与IE8在很多事情的处理打破。

Many JavaScript libraries (especially non-recent ones) do not handle IE9 well because it breaks with IE8 in the handling of a lot of things.

JS code,它嗅着为IE浏览器将在IE9中屡有失败,除非这种code重写处理IE9明确。

JS code that sniffs for IE will fail quite frequently in IE9, unless such code is rewritten to handle IE9 specifically.

在JS code更新之前,您应该使用X-UA-Compatible的meta标签,迫使你的网页进入IE8模式。

Before the JS code is updated, you should use the "X-UA-Compatible" meta tag to force your web page into IE8 mode.

编辑:无法相信,在3年后,我们是到IE11,而且仍有上行票这一点。 :-)很多JS库现在应该至少支持IE9本身,最支持IE10,所以这是不可能的,你需要的meta标签,这些天,除非你不打算升级您的JS库。但要注意,IE10改变有关跨域脚本和一些基于CDN库code休息的事情。检查您的库版本。例如,1.9道场的CDN将打破IE10,但是1.9.1解决它。

Can't believe that, 3 years later and we're onto IE11, and there are still up-votes for this. :-) Many JS libraries should now at least support IE9 natively and most support IE10, so it is unlikely that you'll need the meta tag these days, unless you don't intend to upgrade your JS library. But beware that IE10 changes things regarding to cross-domain scripting and some CDN-based library code breaks. Check your library version. For example, Dojo 1.9 on the CDN will break on IE10, but 1.9.1 solves it.

编辑2:嘿,伙计们,你的真正的现在需要得到您的行为在一起。我们现在是在2014年年中!我的 STILL 的起床-票的!修改您的网站摆脱旧IE硬codeD的依赖!

EDIT 2: Hey, guys, you REALLY need to get your acts together now. We are now in mid-2014!!! I am STILL getting up-votes for this! Revise your sites to get rid of old-IE hard-coded dependencies!

唉...如果我知道这将是迄今为止我国最普遍的回答,我可能会花更多的时间打磨这...

Sigh... If I had known that this would be by far my most popular answer, I'd probably have spent more time polishing it...

修改3:这是现在几乎2016年Upvotes依然微涨......我想还有的地段的传统code在那里...一个一天,我们的节目将超出我们的生活...

EDIT 3: It is now almost 2016. Upvotes still ticking up... I guess there are lots of legacy code out there... One day our programs will out-live us...

这篇关于IE9的JavaScript错误:SCRIPT5007:无法获得属性“UI”的值:对象为null或undefined的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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