Delay dramas

Results 1 to 3 of 3

Thread: Delay dramas

  1. #1
    Join Date
    Dec 1969

    Default Delay dramas

    I have programmed a simple page delay function that just loops for a few seconds so that the page delays.<BR> <BR>Problem is, no matter where I call the function from, it always executes FIRST. Even if it is called in the last line of the code; when you open the page, it first delays for the designated time and then seems to execute the code above that delay command in the correct order from there?? Bizzar. Please help

  2. #2
    Join Date
    Dec 1969

    Default DELAY?!

    Forget the problem - why are you doing a delay?<BR><BR>What you&#039;ve coded is what&#039;s known as a "busy loop". Nothing else can process while that process is running and it&#039;s exceptionally bad coding.<BR><BR>It&#039;s no wonder it&#039;s not performing as you expected.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default If you want a page to display for...

    ...a certain time and then go to another page or refresh or whatever, use the meta refresh tag...:<BR><BR>&#060;META HTTP-EQUIV=Refresh CONTENT="10; URL="&#062;<BR><BR>The above loads the URL after 10 seconds. The URL could be the same as the current page if you wanted to do a refresh.<BR><BR>...or use JavaScript:<BR><BR>setTimeout("document.URL=&#039;", 10000);<BR><BR>This does the same as the META tag code above.<BR><BR>Oliver.

Posting Permissions

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