Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question help...Jump to a new page

    Ok guys,
    I am new to HTML and I need some help. I would like to have a web page forward a user to a new web page without them clicking on anything.

    Can anyone help me on this matter.

    Thanks,
    Tommy
    tlafleur@usa.net

  • #2
    Regular Coder
    Join Date
    Aug 2002
    Location
    Sacramento, California
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    here this should help u out it will redirect the user upon so many seconds after the page loads, you can fool around with it. hope it works out! place this below your body tag:

    Code:
    place script in body of page
    ===================================================
    <form name="redirect">
    <center>
    <font face="Arial">
    <b>You will be redirected to the script in<br>
    <br>
    <form><input type="text" size="3" name="redirect2">
    </form>seconds</b>
    </font>
    </center>
    <script><!--
    /*Copyright 2000 Stephen Shellard (c)*/
    //change below target URL to your own
    
    var targetURL="http://www.a1javascripts.com"
    
    //change the second to start counting down from
    
    var countdownfrom=10
    
    var currentsecond=document.redirect.redirect2.value=countdownfrom+1
    function countredirect(){
    if currentsecond!=1){
    currentsecond-=1
    document.redirect.redirect2.value=currentsecond
    }
    else{
    window.location=targetURL
    return
    }
    setTimeout("countredirect()",1000)
    }
    
    countredirect()
    //-->
    </script>
    Hairynugs


    Simple is best.

  • #3
    New to the CF scene
    Join Date
    Sep 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Reply to post 'help...Jump to a new page'

    For some reason it did not work. I pasted the code so you can look at it.


    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <title>New Page 1</title>
    </head>

    <body>

    &lt;form name="redirect"&gt;
    &lt;center&gt;
    &lt;font face="Arial"&gt;
    &lt;b&gt;You will be redirected to the script in&lt;br&gt;
    &lt;br&gt;
    &lt;form&gt;&lt;input type="text" size="3" name="redirect2"&gt;
    &lt;/form&gt;seconds&lt;/b&gt;
    &lt;/font&gt;
    &lt;/center&gt;
    &lt;script&gt;&lt;!--
    /*Copyright 2000 Stephen Shellard (c)*/
    //change below target URL to your own

    var targetURL="http://www.a1javascripts.com"

    //change the second to start counting down from

    var countdownfrom=10

    var currentsecond=document.redirect.redirect2.value=countdownfrom+1
    function countredirect(){
    if currentsecond!=1){
    currentsecond-=1
    document.redirect.redirect2.value=currentsecond
    }
    else{
    window.location=targetURL
    return
    }
    setTimeout("countredirect()",1000)
    }

    countredirect()
    //--&gt;
    &lt;/script&gt;

    </body>

    </html>

  • #4
    New Coder
    Join Date
    Aug 2002
    Posts
    76
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could just use:

    <META http-equiv=refresh content=0;URL=http://www.yoursite.com>

    Replacing the red sections with what you want.

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Location
    Sacramento, California
    Posts
    132
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the reson that script is not working is cause u forgot the
    <script>&</script> tags copy this:
    Code:
    <form name="redirect">
    <center>
    <font face="Arial">
    <b>You will be redirected to the script in<br>
    <br>
    <form><input type="text" size="3" name="redirect2">
    </form>seconds</b>
    </font>
    </center>
    <script><!--
    /*Copyright 2000 Stephen Shellard (c)*/
    //change below target URL to your own
    
    var targetURL="http://www.a1javascripts.com"
    
    //change the second to start counting down from
    
    var countdownfrom=10
    
    var currentsecond=document.redirect.redirect2.value=countdownfrom+1
    function countredirect(){
    if currentsecond!=1){
    currentsecond-=1
    document.redirect.redirect2.value=currentsecond
    }
    else{
    window.location=targetURL
    return
    }
    setTimeout("countredirect()",1000)
    }
    
    countredirect()
    //-->
    </script>
    I would just use meta tag like galdo said it will be easier 4 u!
    Hairynugs


    Simple is best.


  •  

    Posting Permissions

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