最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Javascript errors on internet explorer with jQuery but working fine on Firefox - Stack Overflow

programmeradmin1浏览0评论

A quick question I'm hoping someone can help me out with.

On firefox our jQuery slider is working perfectly, however on viewing with internet explorer there are some javascript errors occurring. The website is .php

Hoping there is a possible solution to this.

Kind Regards and Thank You!

Errors: Webpage error details

User Agent: Mozilla/4.0 (patible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Wed, 6 Jun 2012 22:36:43 UTC

Message: Object doesn't support this property or method Line: 5653 Char: 9 Code: 0 URI: .js

Message: Object doesn't support this property or method Line: 5988 Char: 5 Code: 0 URI: .js

Message: Object doesn't support this property or method Line: 2 Char: 5 Code: 0 URI: .js

Message: Object doesn't support this property or method Line: 5736 Char: 7 Code: 0 URI: .js

Message: Object doesn't support this property or method Line: 5988 Char: 5 Code: 0 URI: .js

Message: Object doesn't support this property or method Line: 73 Char: 11 Code: 0 URI: .php

A quick question I'm hoping someone can help me out with.

On firefox our jQuery slider is working perfectly, however on viewing with internet explorer there are some javascript errors occurring. The website is http://foscam-uk./index.php

Hoping there is a possible solution to this.

Kind Regards and Thank You!

Errors: Webpage error details

User Agent: Mozilla/4.0 (patible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3) Timestamp: Wed, 6 Jun 2012 22:36:43 UTC

Message: Object doesn't support this property or method Line: 5653 Char: 9 Code: 0 URI: http://foscam-uk./js/prototype/prototype.js

Message: Object doesn't support this property or method Line: 5988 Char: 5 Code: 0 URI: http://foscam-uk./js/prototype/prototype.js

Message: Object doesn't support this property or method Line: 2 Char: 5 Code: 0 URI: http://foscam-uk./skin/frontend/default/theme316/js/scripts.js

Message: Object doesn't support this property or method Line: 5736 Char: 7 Code: 0 URI: http://foscam-uk./js/prototype/prototype.js

Message: Object doesn't support this property or method Line: 5988 Char: 5 Code: 0 URI: http://foscam-uk./js/prototype/prototype.js

Message: Object doesn't support this property or method Line: 73 Char: 11 Code: 0 URI: http://foscam-uk./index.php

Share Improve this question edited Jun 9, 2012 at 19:18 artlung 33.8k19 gold badges74 silver badges124 bronze badges asked Jun 6, 2012 at 22:30 user994319user994319 2511 gold badge7 silver badges22 bronze badges 2
  • Which havascript errors are occurring? – Bergi Commented Jun 6, 2012 at 22:34
  • I'm also facing the same issue and answers did not help. – Rohit Commented Jul 31, 2013 at 19:14
Add a ment  | 

4 Answers 4

Reset to default 2

IE has some limitations on number of CSS and JS files. (Around 30). I didn't count but seems like you have tons of JS and css file references. If you exceed this IE basically stop downloading the script or css file. You can verify it yourself by using Fiddler.

Try to pact them to single file with pressor tools (ex: http://developer.yahoo./yui/pressor/ )

prototype.js seems to be throwing errors in every browser but these seem to have no effect on your site.

your site works fine in IE7 and IE10. In IE8, your version of jQuery throws an error, not the slider code. I would upgrade your 1.7.1 version of jQuery to 1.7.2 (the latest).

So it looks like you're loading a several third party libraries. You're loading PrototypeJS, Scriptaculous, jQuery, and jQuery plugins*. It appears to me what you have is not so much a JavaScript problem as a plugin organization problem.

Now, you do appear to be using things like jQuery.noConflict() in one place, but then not in another.

My suggestion is to deactivate all the current modules you're using on the site which inject JavaScript, and then re-enable them one at a time. Each time you re-enable a plugin, check to see whether that, and all the other plugins are also working.


*Actually, you're loading more than just a few libraries. You're actually loading two versions of jQuery, plus Prototype. This is not a good practice. Here's what I can see, not counting the Magento generated code that is being inserted:

  • Prototype 1.7
  • Credit Card Validation Javascript
  • Really easy field validation with Prototype
  • script.aculo.us builder.js
  • script.aculo.us effects.js
  • script.aculo.us controls.js
  • script.aculo.us slider.js
  • jQuery 1.4.2
  • jCarouselLite
  • jQuery 1.7.1
  • TMSlider: jQuery based image slider
  • jQuery Easing v1.3

You need to do a rethink as to how you're handling some of these effects. There's a great deal of overlap in what these libs do, and you'd be better off seeing if there's a way to create some sanity in which modules you're choosing.

I had a similar issue with my client-side script. The IE10 F12 Dev tools script tab showed errors on jQuery syntax even though the site worked in IE8 and IE9.

One of the libraries I used (Telerik Kendo UI) was not IE10 patible yet.

In order to force IE10 to show the page, I had to add this meta tag to the very top (first item in head) of my HEAD tag:

 <meta http-equiv="X-UA-Compatible" content="IE=9" />

Then the pages worked again.

发布评论

评论列表(0)

  1. 暂无评论