简体   繁体   中英

IE hanging on js errors

The page hangs for a long time in IE but Chrome/FF power right through it.

Here's the page in question http://174.120.239.48/~peakperf/

=============

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729) Timestamp: Mon, 7 Mar 2011 21:18:49 UTC

Message: Not implemented

Line: 432 Char: 7 Code: 0 URI: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js

==========

Here's the pastebin of the js: http://pastebin.com/xXaCK6XH

Here's the js in question: http://174.120.239.48/~peakperf/wp-content/themes/strausberg/js/jquery.simplemodal-1.4.1.js

Thank you!

You need to make sure any Javascript (jQuery) that manipulates the DOM happens in the ready() event of the document .

In several places in your HTML, you're modifying the DOM right when the script tag gets parsed. Now, if you look in the IE dev toolbar, you'll notice the following:

SCRIPT16385: Not implemented

jquery.simplemodal-1.4.1.js, line 432 character 7
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] DOM not ready, queuing slideshow 
LOG: [cycle] terminating; too few slides: 0 
LOG: [cycle] terminating; zero elements found by selector 

I think the offending Javascript is:

<Script type="text/javascript">
jQuery(".basic").modal({overlayClose:true});
</script>

Which should be changed to:

<script type="text/javascript">
  jQuery(document).ready(function() {
    jQuery(".basic").modal({overlayClose:true});
  });
</script>

这个网站说IE8不支持函数( removeExpression ),因为它已被弃用: http : removeExpression

Just ran into this issue, was using a reserved JS word and IE was throwing this error. :| Hope it helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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