Results 1 to 5 of 5

Thread: Automatic link (without clicking)

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Beyond Juslibol
    Posts
    9

    Automatic link (without clicking)

    When I load my home page I want to be automaticaly redirected to other URL. I read somewhere that this piece of code is all I need.

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="2;URL="http://www.jumphere.com/home.html">
    </HEAD>
    </HTML>

    However this code does not redirect me anywhere. It looks like it is reloading the original page every 2 seconds.

    What can I do? Is there any mistake?

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    here. in your body tag:
    onLoad="location.href='http://www.msn.com'"
    Have I helped you? Please Rate my posts.

  3. #3
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    <meta http-equiv="Location" value="newurl">

    All these things confuse the back button though. Any chance you can do this thing on the server side?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Automatic link (without clicking)

    Originally posted by Doctor Luz
    When I load my home page I want to be automaticaly redirected to other URL. I read somewhere that this piece of code is all I need.

    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="2;URL="http://www.jumphere.com/home.html">
    </HEAD>
    </HTML>

    However this code does not redirect me anywhere. It looks like it is reloading the original page every 2 seconds.

    What can I do? Is there any mistake?
    Your quotes are off.... it should be:
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Refresh" CONTENT="2;URL=http://www.jumphere.com/home.html">
    </HEAD>
    </HTML>
    The " after the URL=" causes the page to think you want to go to the current URL... which is why the page reloads, and reloads, and reloads, and reloads, and reloads, .....

    <meta http-equiv="Location" value="newurl">
    Works as well, the nice thing about option one above is that you can print a message that lets the user know that they are about to be redirected. And possibly provide a link in case the refresh doesn't work.

    TG
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Beyond Juslibol
    Posts
    9
    Thank you to all guys.

    Have a nice day!

Posting Permissions

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



Click Here to Expand Forum to Full Width