Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: How do I create a delay function


Message #1 by "Mark Collins" <mark.collins@c...> on Sat, 24 Feb 2001 23:19:11
Hi All,



Thanks for the help recently, its helped me out no end. I have a thirst 

for this and so need to keep asking lots more.



Can anybody tell me hoe I can create a delay function/subroutine



I want to be able to display something from a database, then something 

else say afetr 5 seconds then something else etc etc. When the screen 

fills, I'd like to start over again



something like the pseudo below:



open connection to database



while (not rs.eof)

 show stuff

 delay(5)

 more stuff

 delay(5)

 more stuff

 delay(5)

 if pagefull then

   clearscreen

 end if

 rs.movenext

wend



sorry about the syntax, its appauling I know, I'm more interested in the 

Delay() function.



Any Ideas?



Many thanks



Mark.
Message #2 by "Gerhard Wentink" <wentink@w...> on Sun, 25 Feb 2001 06:46:42 +0100
As far as I know there is not such a "delay" function.

You could do something like this:

Tell the page to refresh each 5 seconds (in a metatag). Set cookies to keep

track of what the page allready received.



Regards,



Gerhard Wentink



----- Original Message -----

From: "Mark Collins" <mark.collins@c...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Saturday, February 24, 2001 11:19 PM

Subject: [asp_web_howto] How do I create a delay function





> Hi All,

>

> Thanks for the help recently, its helped me out no end. I have a thirst

> for this and so need to keep asking lots more.

>

> Can anybody tell me hoe I can create a delay function/subroutine

>

> I want to be able to display something from a database, then something

> else say afetr 5 seconds then something else etc etc. When the screen

> fills, I'd like to start over again

>

> something like the pseudo below:

>

> open connection to database

>

> while (not rs.eof)

>  show stuff

>  delay(5)

>  more stuff

>  delay(5)

>  more stuff

>  delay(5)

>  if pagefull then

>    clearscreen

>  end if

>  rs.movenext

> wend

>

> sorry about the syntax, its appauling I know, I'm more interested in the

> Delay() function.

>

> Any Ideas?

>

> Many thanks

>

> Mark.

>

Message #3 by "TomMallard" <mallard@s...> on Sun, 25 Feb 2001 06:17:17 -0800
You could set up a function using datediff() and timer() that won't return

true until so much time has passed...on the client there's settimeout().



tom mallard

seattle

----- Original Message -----

From: "Gerhard Wentink" <wentink@w...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Saturday, February 24, 2001 9:46 PM

Subject: [asp_web_howto] Re: How do I create a delay function





> As far as I know there is not such a "delay" function.

> You could do something like this:

> Tell the page to refresh each 5 seconds (in a metatag). Set cookies to

keep

> track of what the page allready received.

>

> Regards,

>

> Gerhard Wentink

>

> ----- Original Message -----

> From: "Mark Collins" <mark.collins@c...>

> To: "ASP Web HowTo" <asp_web_howto@p...>

> Sent: Saturday, February 24, 2001 11:19 PM

> Subject: [asp_web_howto] How do I create a delay function

>

>

> > Hi All,

> >

> > Thanks for the help recently, its helped me out no end. I have a thirst

> > for this and so need to keep asking lots more.

> >

> > Can anybody tell me hoe I can create a delay function/subroutine

> >

> > I want to be able to display something from a database, then something

> > else say afetr 5 seconds then something else etc etc. When the screen

> > fills, I'd like to start over again

> >

> > something like the pseudo below:

> >

> > open connection to database

> >

> > while (not rs.eof)

> >  show stuff

> >  delay(5)

> >  more stuff

> >  delay(5)

> >  more stuff

> >  delay(5)

> >  if pagefull then

> >    clearscreen

> >  end if

> >  rs.movenext

> > wend

> >

> > sorry about the syntax, its appauling I know, I'm more interested in the

> > Delay() function.

> >

> > Any Ideas?

> >

> > Many thanks

> >

> > Mark.

> >

>




$subst('Email.Unsub')

>

>



Message #4 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Mon, 26 Feb 2001 16:09:10 -0000
probably not a good idea to tie up your server by putting delays in like

this.  get all your data out in one go, and then place each bit of data in a

hidden DIV on the page.  Now use the setTimeout method of the browser to

display the divs one by one, with a delay in between.



setTimeout Method



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

----



Evaluates an expression after a specified number of milliseconds has

elapsed. 



Syntax



iTimerID = window.setTimeout(vCode, iMilliSeconds, sLanguage)

Parameters



vCode Required. Variant that specifies the function pointer or string that

indicates the code to be executed when the specified interval has elapsed. 

iMilliSeconds Required. Integer that specifies the number of milliseconds. 

sLanguage Required. String that specifies one of the following values:

JScript Language is JScript. 

VBScript Language is VBScript. 

JavaScript Language is JavaScript. 

 



Return Value



Integer. Returns an identifier that cancels the evaluation with the

clearTimeout method. 





-----Original Message-----

From: Mark Collins [mailto:mark.collins@c...]

Sent: Saturday, February 24, 2001 11:19 PM

To: ASP Web HowTo

Subject: [asp_web_howto] How do I create a delay function





Hi All,



Thanks for the help recently, its helped me out no end. I have a thirst 

for this and so need to keep asking lots more.



Can anybody tell me hoe I can create a delay function/subroutine



I want to be able to display something from a database, then something 

else say afetr 5 seconds then something else etc etc. When the screen 

fills, I'd like to start over again



something like the pseudo below:



open connection to database



while (not rs.eof)

 show stuff

 delay(5)

 more stuff

 delay(5)

 more stuff

 delay(5)

 if pagefull then

   clearscreen

 end if

 rs.movenext

wend



sorry about the syntax, its appauling I know, I'm more interested in the 

Delay() function.



Any Ideas?



Many thanks



Mark.





________________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com


  Return to Index