开发者

Out of memory at line 12

开发者 https://www.devze.com 2023-01-16 09:08 出处:网络
I\'ve developing a website in localhost. I\'m using jquery, some javascripts, CSS and HTML. When I try to load the site with IE, an error message pops up saying \"Out of memory at line 12\". I clicked

I've developing a website in localhost. I'm using jquery, some javascripts, CSS and HTML. When I try to load the site with IE, an error message pops up saying "Out of memory at line 12". I clicked "OK' and it continues working fine. The message however doesn't show up in Chrome or Firefox. Can anyone tell me why is it so. How can i fix it??

Edit: I removed the jquery ui inclusion line and it stopped showing the errors. (Removed the line below)

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>

My Javascript code.

<script type="text/javascript">
 $(document).ready(function() {


        $("ul.blockeasing li.main").mouseover(function(){ //When mouse over ...
               //Following event is applied to the subnav itself (making height of subnav 60px)
              $(this).find('.subnav').stop().animate({height: '60px', opacity:'1'},{queue:false, duration:1500, easing: 'easeOutElastic'})
        });

        $("ul.blockeasing li.main").mouseout(function(){ //When mouse out ...
              //Following event is applied to the subnav itself (making height of subnav 0px)
              $(this).find('.subnav').stop().animate({height:'0px', opacity:'0'},{queue:false, duration:1600, easing: 'easeOutElastic'})
        });


        //menu itembackground color animation           
        $("ul.blockeasing li").hover(function() {
          开发者_C百科    $(this).stop().animate({ backgroundColor: "#C13D93"}, 600);},
           function() {
              $(this).stop().animate({ backgroundColor: "#de93c3" }, 600);
        });

});
</script>


First off, it's impossible to tell without any source. "Out of memory" could be an infinite loop. I really don't know.

But you state that you're "... trying to execute PHP code." In that case make sure that line 12 is really what you think it is. If you've got PHP and HTML in the same file remember that you're looking for line 12 on the client (i.e., in the rendered output), not in the PHP file.


EDIT
We don't need your PHP code. Actually we're only interested in the rendered output (i.e., the resulting mark-up - HTML & JavaScript - sent to the browser). If the error is caused by an included JS file, please post this file.

Furthermore, a few comments on your question is worth noting. Not least @strager's comment; remove JS inclusions until the error disappears. This will probably help you identify the cause.


some other people, including MrBoJangles and this guy have probably figured this problem out, and I can confirm from experience. Make sure you're running compatible versions of JQuery & JQueryUI - ie just get the latest stable releases of both. The issue I was having in IE8 was based on this compatibility issue - I was initially running JQuery 1.3.2, and I needed a newer version to work with my newer version of JQuery UI.


mostly this error is caused by infinite recursive function calls which deplete the browser stack giving 'Out of memory error'

0

精彩评论

暂无评论...
验证码 换一张
取 消