Web Analytics Made Easy -
StatCounter Stack Overflow at Line: 0 - CodingForum

Announcement

Collapse
No announcement yet.

Stack Overflow at Line: 0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stack Overflow at Line: 0

    Hello all,

    I get the above error (Stack Overflow at line: 0) with my web page. I know its a javascript error and I know it is as a result of a peice of javascript I recently inserted into my page to display a picture based on the day of the week. The page still loads fine and looks proper but at the start this stack error overflow pops up as an alert... it is also displayed fine in netscape but netscape doesnt have the error... I've heard this error is as a result of me recursing to deep... but what exaclty does that mean?

    Ta

    Murdz
    Spiral Out

  • #2
    Recursion has maximum depth, and this vary on different browsers. Read this related thread.
    Glenn
    vBulletin Mods That Rock!

    Comment


    • #3
      Hmm, thanx. That does help but I dont know how and where to use the setInterval object or the setTimeout object?
      Spiral Out

      Comment


      • #4
        I don't think you will get much help unless you post the link or the code

        Comment


        • #5
          Very well, the entire script section of this page is:

          Code:
          <script>
          <!--
          window.status = document.title;
          
          var Days = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
          var TheDate = new Date();
          
          var TheDay = TheDate.getDay();
          var Day = Days[TheDay];
          Day = Day.toLowerCase();
          
          current_title = document.title;
          current_page = window.location;
          
          if (document.images) {
            var sb1_a = new Image();
            sb1_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb1_b = new Image();
            sb1_b.src = "images/soccer_ball_whitebg.gif";
            var sb2_a = new Image();
            sb2_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb2_b = new Image();
            sb2_b.src = "images/soccer_ball_whitebg.gif";
            var sb3_a = new Image();
            sb3_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb3_b = new Image();
            sb3_b.src = "images/soccer_ball_whitebg.gif";
            var sb4_a = new Image();
            sb4_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb4_b = new Image();
            sb4_b.src = "images/soccer_ball_whitebg.gif";
            var sb5_a = new Image();
            sb5_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb5_b = new Image();
            sb5_b.src = "images/soccer_ball_whitebg.gif";
            var sb6_a = new Image();
            sb6_a.src = "images/soccer_ball_whitebg_stat.gif";
            var sb6_b = new Image();
            sb6_b.src = "images/soccer_ball_whitebg.gif";
            
            var home_a = new Image();
            home_a.src = "images/ihome-gs.gif"
            var home_b = new Image();
            home_b.src = "images/ihome.gif";
            
            var fav_a = new Image();
            fav_a.src = "images/ifav-gs.gif";
            var fav_b = new Image();
            fav_b.src = "images/ifav.gif";
            
            var author_a = new Image();
            author_a.src = "images/author_bg.jpg";
            var author_b = new Image();
            author_b.src = "images/mo_author_bg.jpg";
          }
          
          function swap_image(imgName) {
            if ( document.images )
              document.images[imgName].src = eval(imgName + "_b.src");
          }
          
          function reset_image(imgName) {
            if ( document.images )
              document.images[imgName].src = eval(imgName + "_a.src");
          }
          
          function show_date() {
            if ( document.images )
              document.images.weekday.src = "images/" + Day + ".jpg";
          }
          
          function main_logo() {
            if ( screen.width <= 800 ) {
              document.images.logo.width = 500;
            }
          }
          
          //-->
          </script>
          the error started showing right after I did all my date stuff.
          Spiral Out

          Comment


          • #6
            Give us the whole code, or a link to it.

            Comment

            Working...
            X