Results 1 to 4 of 4

Thread: Reload with javascript

  1. #1

    Thread Starter
    Hyperactive Member DKCK's Avatar
    Join Date
    Dec 2000
    Location
    United States
    Posts
    329

    Lightbulb Reload with javascript

    Anyone have a quick javascript to reload a page every five minutes?

  2. #2
    Hyperactive Member bsw2112's Avatar
    Join Date
    Nov 2001
    Location
    ottawa, canada
    Posts
    292
    <html>
    <head><script>

    function doit() {
    window.location.href = "index.html";
    }
    function reloadme() {

    setInterval("doit()",300000);
    }
    </script>
    </head>


    <body onLoad=" return reloadme()">

    hello
    </body>
    </html>

    not sure if syntax is correct

    bsw2112

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    another idea...

    Code:
    <HTML>
    <HEAD>
    <SCRIPT LANGUAGE="Javascript">
    <!--
    
    var URL = "page.html"; // page to redirect to, enter same filename to reload
    var interval = 300000; // in milliseconds. 1 second = 1000
    
    function reload() {
        location = URL;
    }
    
    setTimeout("reload()", interval);
    
    //-->
    </script>
    </HEAD>
    <BODY>
    Stuff
    </BODY>
    </HTML>

  4. #4
    New Member
    Join Date
    Aug 2002
    Location
    lebanon
    Posts
    13
    try this i hope u like it:
    ____________________________________________________
    <html>
    <head>
    <meta http-equiv="Refresh"
    content="300;url=YOUR_WEBSITE_NAME">
    </head>

    <body>
    BLA BLA BLA BLA BLA BLA
    </body>

    </html>
    ____________________________________________________
    NOTE:the number (300) is the number of seconds (300 seconds=5minutes)

    BEST REGARDs,
    Any Problem made by man is solved by man.

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