Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org

BBS: Re: loops in Javascript? - June 16, 1998 at 10:29:45

You are here: irt.org | BBS | Re: loops in Javascript? [This BBS is closed]

Posted by Enrique Reyes on June 16, 1998 at 10:29:45:

In Reply to: Re: loops in Javascript? posted by oz on June 16, 1998 at 05:37:48:

you can do what you want; that "loop":

<A HREF="#null" onMouseOver="scroll_loop=true;scroll ('up',speed)" onMouseOut="scroll_loop=false">up-arrow</A>

the same for "down-arrow"

and in your scroll function (pseudo-pseudo-code,check the sintax :-) ):

function scroll (direc,speed){
do {

//do the needed things
...
scroll_timer=setTimeout (scroll (direc,speed));
} while (scroll_loop)
clearTimeout (scroll-timer);
}

This can be done too with if...then settimeout, etc,etc
you can put an adicional clearTimeout (scroll-timer) in the onmouse out events.
I think this must work.

Follow-ups:

You are here: irt.org | BBS | Re: loops in Javascript? [This BBS is closed]

©2018 Martin Webb