Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Time delay then Redirect

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,360
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Time delay then Redirect
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Time delay then Redirect - 8/24/2001 2:42:06 PM   
  hellowchan

 

Posts: 2
Score: 0
Joined: 8/24/2001
From:
Status: offline
Hello All,

I would like a page to display query result and then wait 5 sec before redirecting user to another page.

Is there a function to do the time delay?

I tried to code it but get an error message:
<%

Dim iCount
iCount = 0

Do Until (iCount = 50)
If (iCount => 50) Then
Response.Redirect "DisplayResources.asp"

Else

(iCount = iCount + 1)

End If

Loop

%>

Thanks in advance.

NB
 
 
Post #: 1
 
 Re: Time delay then Redirect - 8/24/2001 9:16:58 PM   
  rhl150

 

Posts: 29
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
How about this

<html>
<head>
<title>Perspectives</title>
<meta http-equiv="Refresh" content="500; url=DisplayResources.asp">
</head>

(in reply to hellowchan)
 
 
Post #: 2
 
 Re: Time delay then Redirect - 8/28/2001 6:58:55 PM   
  hellowchan

 

Posts: 2
Score: 0
Joined: 8/24/2001
From:
Status: offline
I know meta tag can redirect but I tried to use code so I can expand it later on.

Thanks.

NB

(in reply to hellowchan)
 
 
Post #: 3
 
 Re: Time delay then Redirect - 8/29/2001 4:36:36 AM   
  rhl150

 

Posts: 29
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
Ok,

Here it is , 100% in VBScript:)

<SCRIPT language=VBScript>
sub SF
window.location="http://www.google.com"
end sub
id=SetTimeOut("SF",5000,"VBScript")
</SCRIPT>

(in reply to hellowchan)
 
 
Post #: 4
 
 Re: Time delay then Redirect - 7/1/2004 2:12:48 AM   
  xxdaviddxx

 

Posts: 1
Score: 0
Joined: 7/1/2004
From:
Status: offline
'Delay redirect for two seconds'
Dim StartTime, EndTime, WaitTime
' Get Start Time'
StartTime = Timer()

'Get End Time'
EndTime = Timer()

'Determine how long it took'
WaitTime = EndTime - StartTime

'Continue checking the elapsed time until it reaches 2 seconds'
do while WaitTime < 2
'Get End Time'
EndTime = Timer()

'Determine how long it took'
WaitTime = EndTime - StartTime
loop

Response.Redirect "DisplayResources.asp"

(in reply to hellowchan)
 
 
Post #: 5
 
 Re: Time delay then Redirect - 8/17/2004 10:32:27 PM   
  Matt

 

Posts: 30
Score: 0
Joined: 8/17/2004
From: United Kingdom
Status: offline
The problem with the code in post 1 is that it is trying to run on the server and you would need it to run on the client PC as per many of the other posts.

(in reply to hellowchan)
 
 
Post #: 6
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Time delay then Redirect Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts