netscape infinate loop

by "Samuel Bragg" <goomoo(at)hotmail.com>

 Date:  Fri, 12 May 2000 14:21:51 PDT
 To:  hwg-languages(at)hwg.org
  todo: View Thread, Original
i seem to have created a small problem with netscape, the script below will 
stall out netscape, rendering it unusable until the computer is restarted. 
if anyone has any idea how this could have happened please let me know:

<SCRIPT LANGUAGE="JavaScript">

function positionLayers() {

	overviewObj = eval(document["overviewLyr"]);
    overviewObj.top = 75;
}
var direction = "up";
var timer1 = null;

function move(dir) {
    direction = dir;
    var y_pos = parseInt(overviewObj.top);

        if(direction == "dn" && y_pos > -100) {
            overviewObj.top = (y_pos-2);

            clearTimeout(timer1);
            timer1 = setTimeout("move(direction)", 1);
        } else if(direction == "up" && y_pos < 75) {
            overviewObj.top = (y_pos+2);

            clearTimeout(timer1);
            timer1 = setTimeout("move(direction)", 1);
        } else {
            overviewObj.top = y_pos;
        }
}
</SCRIPT>

<body onload="positionLayers()">



Sam =)
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA