border image
logo border image







Your basket has: Total items: 0
Subtotal: $0.00




border image
 
corner image
corner image

Article


 Making your page auto-refresh
Here is a simple screen auto-refresh technique. Use the HTML META tag like this:

<META http-equiv="refresh" content="5;URL="Mypage.asp">

The '5' is the delay time in seconds before opening the URL. The URL is the page you wish to open after the delay. If you redirect the page back to itself it will continue to auto-refresh every 5 seconds. To further enhance the effect, a random time can be applied. To get the random time, insert the following code before the META tag.

<%
' Get Random delay time
Randomize
DELAY_TIME= Int(Rnd * 90) + 1
' Set a minimum duration
If DELAY_TIME < 30 then
DELAY_TIME= DELAY_TIME + 30
End if
%>

and change the META tag to be as follows:

<META http-equiv="refresh" content="<%=DELAY_TIME%>;URL=Mypage.asp">

The random time produced from the script will fall between 30 and 90 seconds. Unless the page is redirected to itself, the META tag should be the last line of code on the page.

Rate this article
Low High
Return To Top
corner image
corner image