SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2000
    Location
    Peterborough, England
    Posts
    50
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Does anyone know how to make a page redirect to another page after a given time? I am using a FREE ISP so i do not have ASP etc. I only have JAVA Script and HTML.

    I look forward to a reply,

    MATT.

  2. #2
    Kat's Meow Senior ******* WebKat's Avatar
    Join Date
    Jul 1999
    Location
    California USA
    Posts
    1,071
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Insert this HTML redirection - change the URL, the number of seconds (CONTENT) and this will send your visitor to your other page.

    <HTML><HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="5; URL=http://www.YourSitePage.html">
    <TITLE>Now Loading...</TITLE></HEAD>
    <BODY>
    Optional comment(s) can be added, for example - This will send you to 'Your Site's Page' in 5 seconds.
    </BODY></HTML>


    NOTE: Some of the older browsers may not recognize this, which is why you may have seen comments such as 'if not redirected click here' on some web pages. And search engines may not index your redirected page, which you do not want to happen. So a simple link to the new page may be all that you need to do!

    ------------------
    Dlynn ~SitePoint Moderator~
    PawPrint Designs by WebKat
    "Let's keep Ethics on the Web"

    [This message has been edited by WebKat (edited August 13, 2000).]

  3. #3
    SitePoint Member
    Join Date
    Jan 2002
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <script language="javascript">
    <!-- hide from older browsers

    timer = window.setTimeout("windowTimer ();",3000);
    function windowTimer () {
    opener.document.location = "anotherpage.html";
    }
    //-->
    </script>

    This is another version for redirection when a page loads. The 3000 is 3 seconds. It may need alteration to suit your needs.

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    fwiw and despite the fact that this thread had been dead for well over a year...

    I can't believe neither of you two who responded thought to recommend a simple Refresh Meta Tag.

    Into the <HEAD></HEAD> tag...

    <META HTTP-EQUIV="refresh" content="0;URL=nexturl.html">

    0 is the refresh delay in seconds.

    Odd that some web-designers would rather use eight lines of Javascript when one line of good old HTML will do the job just as well.

    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  5. #5
    SitePoint Addict michaelwheaton's Avatar
    Join Date
    Jan 2001
    Location
    Alberta, Canada
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That is basically what WebKat used, only he had it so that it would tell the user they are being redirected, which I think is a good idea. I hate it when sites use the "0" forwarding, because when you go Back, it sends you forward, so you're trapped in that site. I always set it to at least 3 so that they have time to go back. :-)

  6. #6
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just took a quick look at your site michael...

    Just thinking you may want to consider having the portfolio websites open in a new window rather than taking the viewer out of your portfolio site.

    Just a thought

    p.s. agree with you on the extending the delay for the refresh. I just used 0 as an example.
    Last edited by Bill Posters; Jan 7, 2002 at 11:02.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  7. #7
    SitePoint Addict michaelwheaton's Avatar
    Join Date
    Jan 2001
    Location
    Alberta, Canada
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's a good idea to open them in a new window, and I'm surprised I didn't think of that. I guess it's because I've never really used the site. :-)

    Thanks,
    Michael

  8. #8
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    resurrect an old one again, cheers I knew that I didn't need js just couldn't quite remember what I could use

    Thanks all
    Regular user


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •