faqts : Computers : Programming : Languages : PHP : Not Quite PHP : HTML

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

109 of 122 people (89%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

How can I call or goto another page directly without click href?

Jun 10th, 2000 17:38
Cool Man, Marcus Schwarz, Gary Chu,


Add following metatag into your <head> </head> tags:
<meta http-equiv="refresh" content="5; URL=http://foo.com">
content is the time to wat before refresh in seconds, URL is the target-
url. If you do not add the url option the metatag will reload the page 
itself.
A better way is to make a function to do this for you anytime on a 
page, using javascript. This method allows you to forward the page 
right after you do whatever you need to do, rather than setting a 
particular amount of time:
function goto($url){
die "<script>location.href='$url'</script>";
}