Stop, Stop, Stop..... Please HELP (code included) 
Author Message
 Stop, Stop, Stop..... Please HELP (code included)

Q1: clearTimeout does not function in this example....
    Why?
Q2: Is there anyway (outside of pulling the computer's power plug out
    of the wall) to impliment a STOP() function similar to that in NN.

I can supply online example with full code if needed...

Thanks for the help,
Jeff

-------------------------------------
This and the IMG tag below are in a CHILD frame of a frameset.

function canvas_onload() {
        if (parent.firstpic == 1) {
                window.maindelay =
setTimeout("parent.getimages();",2);
                parent.firstpic = 0;
        } else {
                window.maindelay =
setTimeout("parent.getimages();",parent.delay);
        }

Quote:
}

My image that starts the show....

<img src="splash.jpg"  onload="canvas_onload();">

--------------------------------------
This is in the PARENT frame

var maindelay = null;   <== inits the var for the child frame code

function cleartimers() {
  if (maindelay) {
    clearTimeout(maindelay);
    maindelay = null; <--- this is attempting to kill the loop too
  }

Quote:
}

--------------------------------


Mon, 30 Sep 2002 03:00:00 GMT  
 Stop, Stop, Stop..... Please HELP (code included)

You want setInterval, not setTimeout
(also attached)
<html>
<head>
<script>
var interv=window.setInterval('callback()', 4000);
function callback()
{
    alert("callback");
    window.clearInterval(interv)

Quote:
}

</script>
</head>
<body>
</body>
</html>
--
Mark L. Ferguson       Please reply in Newsgroup
marfers notes for OE 5.0  >  http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm
Quote:

> Q1: clearTimeout does not function in this example....
>     Why?
> Q2: Is there anyway (outside of pulling the computer's power plug out
>     of the wall) to impliment a STOP() function similar to that in NN.

> I can supply online example with full code if needed...

> Thanks for the help,
> Jeff

> -------------------------------------
> This and the IMG tag below are in a CHILD frame of a frameset.

> function canvas_onload() {
> if (parent.firstpic == 1) {
> window.maindelay =
> setTimeout("parent.getimages();",2);
> parent.firstpic = 0;
> } else {
> window.maindelay =
> setTimeout("parent.getimages();",parent.delay);
> }
> }

> My image that starts the show....

> <img src="splash.jpg"  onload="canvas_onload();">

> --------------------------------------
> This is in the PARENT frame

> var maindelay = null;   <== inits the var for the child frame code

> function cleartimers() {
>   if (maindelay) {
>     clearTimeout(maindelay);
>     maindelay = null; <--- this is attempting to kill the loop too
>   }
> }
> --------------------------------

  clear_interval.htm
< 1K Download


Mon, 30 Sep 2002 03:00:00 GMT  
 Stop, Stop, Stop..... Please HELP (code included)
Thanks for the help, but I need to use setTimeout and not setInterval
as the setTimeout function is called by the image onload event.
If I'm not 'getting' why I should be using the setInterval function
then please clue me in.
I can also supply you with the source code and site url if needed. But
I must warn you that the code is for a XXX site.
Thanks again,
Jeff

On Thu, 13 Apr 2000 18:05:55 -0500, "Mark L. Ferguson"

Quote:

>You want setInterval, not setTimeout
>(also attached)
><html>
><head>
><script>
>var interv=window.setInterval('callback()', 4000);
>function callback()
>{
>    alert("callback");
>    window.clearInterval(interv)
>}
></script>
></head>
><body>
></body>
></html>



Thu, 03 Oct 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Stop, Stopped ...

2. Browser Stop Button: when does ASP script stop?

3. Weirdness with debugging - STOP not stopping script

4. Please HELP (Net Stop / Net Start Spooler)

5. Shed some light on "stopped" please

6. Stopping Javascript code on the fly

7. Stopping code in the middle of execution

8. How stop user to view VBScript code

9. Example code for stopping/starting svcs using WMI

10. Please stop posting HTML and GIF

11. WSH stopped working after SP2 and Code Red Security patch

12. Stopping code

 

 
Powered by phpBB® Forum Software