...

View Full Version : wait 2 sec



ahmedsoliman
07-17-2002, 11:53 PM
after submit the form enterd by user i want to wait 2 seconed in confirm.asp then redirect them to another page

whammy
07-18-2002, 12:40 AM
<meta http-equiv="Refresh" content="2; URL=http://www.yourpage.here">

ahmedsoliman
07-18-2002, 07:38 AM
i know this code by html but i thought there are a same function by asp,like this site when i post qustion or reply
thank you:)

whammy
07-19-2002, 12:32 AM
You can make it a variable, of course! I do this on some sites at work:

<meta http-equiv="Refresh" content="2; URL=<% = PAGE_URL %>">

:)

whammy
07-19-2002, 12:35 AM
P.S. That should work fine, however here is a sample script done in ASP that will do the same thing:

<%
' 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 5 seconds
do while WaitTime < 5
'Get End Time
EndTime = Timer()

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

'Redirect user, since we know that it has been more than 5 seconds
Response.Redirect "page2.asp"
%>

From: http://www.askasp.com/articles.asp?ArtID=85

As you can see, generally it will be easier to use the HTML way.

:)

ecnarongi
07-19-2002, 06:43 PM
what about Response.AddHeader "Refresh", "2;URL=mypage.htm" ??

whammy
07-20-2002, 11:35 PM
They're all good. :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum