About Page forwarding.

Discussion in 'Web Design & Coding' started by sshenriksen, Jul 16, 2002.

  1. sshenriksen

    sshenriksen Guest

    When some companies get a new homepage, their old page will "Forward you in 5 sec. or click here if it doesn't"

    How do you send somebody to a a new page?

    Sune
     
  2. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,590
    Location:
    Copenhagen, Denmark
    Here is what I use fro http://news.inmatrix.com

    Code:
    <HTML>
    <HEAD>
    <title>Infomatrix News</title>
    <meta http-equiv="refresh" content="0; url=http://news.inmatrix.com/news/index.shtml">
    </HEAD>
    <BODY BGCOLOR="#ECECEC">
    </body>
    </html>
    
     
  3. sshenriksen

    sshenriksen Guest

    Thank you. That was exactly what I needed. :)

    Sune
     
  4. xsk8zerox

    xsk8zerox Moderator

    Messages:
    746
    Location:
    Philly
    Just a warning some users will have meta refresh disabled
     
  5. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    I use the meta version and a nice flabby javascript version too

    Code:
    <body bgcolor=#ffffff text=#000000 link=#000000 alink=#000000 vlink=#000000 onLoad="settimes()"> 
    <script language=JavaScript>
    function display() { 
    	rtime=etime-ctime;
    	if (rtime>60)
    		m=parseInt(rtime/60);
    	else {
    		m=0;
    	}
    	s=parseInt(rtime-m*60);
    	if(s<10)
    		s="0"+s;
    	window.status=+s;
    	window.setTimeout("checktime()",1000);
    }
    
    function settimes() {
    	var time= new Date();
    	hours= time.getHours();
    	mins= time.getMinutes();
    	secs= time.getSeconds();
    	etime=hours*3600+mins*60+secs;
    	etime+= 25;
    	checktime();
    }
    
    function checktime() {
    	var time= new Date();
    	hours= time.getHours();
    	mins= time.getMinutes();
    	secs= time.getSeconds();
    	ctime=hours*3600+mins*60+secs
    	if(ctime>=etime) 
    		expired();
    	else
    		display();
    }
    
    
    function expired() {
    	window.status="Refreshing...";
    	window.location.reload()
    }
    
    </script>
     
    i prefer the java one for my web cam page(s) refresh, as it adds a niffy timer to the status bar :)
     
  6. Kw4ntuM

    Kw4ntuM Guest

    i believe there is a simple dreamweaver plug in for this if anyone cares, check out massimocorner.com(i think the url is right...but its a fairly tempermental sight)
     
  7. Khayman

    Khayman I'm sorry Hal... Political User Folding Team

    Messages:
    5,518
    Location:
    England
    if you use ASP, use response.redirect("URL")

    so easy