Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2004
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can you pasue a script?

    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';}

  • #2
    dep
    dep is offline
    Regular Coder
    Join Date
    Nov 2005
    Posts
    121
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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);



    Quote Originally Posted by stcrim
    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';}


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •