This is some type of time delay code which we used in a project for delaying 2 min and then displaying a mesage
<SCRIPT LANGUAGE="VBScript">
<!--
Dim intTimerID
hr=0 'change hours
min=2 'change minutes
sec=0 'change seconds
Sub HandleTime
if hr=0 and min=0 and sec=0 then
endtime
elseif min>=0 and sec>0 then
sec=sec-1
status=hr & ":" & min & ":" & sec
intTimerID=setTimeOut("HandleTime",950, "VBScript")
elseif min>0 and sec=0 then
min=min-1
sec=59
status=hr & ":" & min & ":" & sec
intTimerID=setTimeOut("HandleTime",950, "VBScript")
elseif hr>=0 and min=0 then
hr=hr-1
min=59
sec=59
status=hr & ":" & min & ":" & sec
intTimerID=setTimeOut("HandleTime",950, "VBScript")
end if
End Sub
Sub endtime
cleartimeout intTimerID
status = "Your Time Ended"
windows.location "yourpage.asp"
end sub
status=hr & ":" & min & ":" & sec
intTimerID=setTimeOut("HandleTime",950, "VBScript")
-->
</SCRIPT>
(*_*)
Numan
--------------------------------------------------
It is not important what you get But important is how you got it
|