...

View Full Version : Can you pasue a script?



stcrim
12-08-2005, 03:52 AM
Is it possible to cause a script to pause for a second or two and then resume?

Though not the best example, let's say you had two pop ups and you wanted one to pop and the other to wait a couple of seconds (see code below)...

...is there a way to do it?

Many Thanks
-s-

<script>
{myWin = open('', 'winin','top=5,left=35,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,width=615,height=565');
self.focus();
myWin.location = 'http://www.autoleadsystems.com/1stc/test_front.html';}

// Is it possible to pause here perhaps using pausecomp(3000) or a timeout function???

{myWin = open('', 'winin2','top=5,left=35,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,width=615,height=565') ;
self.blur();
myWin.location = 'http://www.autoleadsystems.com/1stc/test_back.html';}

dep
12-08-2005, 03:22 PM
That'd be, in javascript, setTimeout(functiontocallafterpause(), milliseconds);

So, for instance, to call the function go() after a one second pause, you'd do:

setTimeout(go(), 1000);




Is it possible to cause a script to pause for a second or two and then resume?

Though not the best example, let's say you had two pop ups and you wanted one to pop and the other to wait a couple of seconds (see code below)...

...is there a way to do it?

Many Thanks
-s-

<script>
{myWin = open('', 'winin','top=5,left=35,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,width=615,height=565');
self.focus();
myWin.location = 'http://www.autoleadsystems.com/1stc/test_front.html';}

// Is it possible to pause here perhaps using pausecomp(3000) or a timeout function???

{myWin = open('', 'winin2','top=5,left=35,toolbar=0,menubar=0,scrollbars=1,status=0,resizable=1,width=615,height=565') ;
self.blur();
myWin.location = 'http://www.autoleadsystems.com/1stc/test_back.html';}



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum