Page 1 of 1

show a message before redirecting

Posted: Thu May 29, 2003 7:40 am
by jiehuang001
For some webpage, when i click the "download" link to download something, I got a message like this "you will be directed to the download page in 5 seconds. Otherwise, please cllick here"

How can I make a link with similar functions? That is, when the link is clicked, some message shows up first. After several seconds, the user will be redirected to another page.

Thanks


Jie Huang

Posted: Thu May 29, 2003 8:38 am
by mikusan

Code: Select all

<BODY onLoad=window.setTimeout("location.href=''download.php?action=download''",5000)>
				<B>You have chosen to download &#123;download_name&#125;<B>
				<BR><BR>
				<small><b>Note:</b>This window will redirect in 5 seconds<BR><BR>
				Don't want to wait?<a href="download.php?action=download.php">click here</a></small>
				</BODY>
This took me some time to make sure worked nicely, i am surprised i wan't able to find something like this myself...

Posted: Thu May 29, 2003 9:08 am
by Wayne
stick this in your HEAD tags

Code: Select all

<meta http-equiv="refresh" content="5;url=yoururlhere.php">
then have your page as normal, it will redirect to the url after 5 seconds.