Refresh page every 5 minutes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Willem

    Refresh page every 5 minutes

    Can someone tell me how I can get a page(any page) on the Internet to
    refresh automatically every 5 minutes. I was thinking along the lines of
    having a HTML file on my C-drive with JavaScript to do so. It should be
    possible, Right?

    I don't know much about JavaScript.

    Thanks for the help.


    --
    Willem Van der Mescht
    horsy@absamail. co.za

    (If there were more horses around
    the world would be more stabilised)


  • Evertjan.

    #2
    Re: Refresh page every 5 minutes

    Willem wrote on 29 jun 2003 in comp.lang.javas cript:
    [color=blue]
    > Can someone tell me how I can get a page(any page) on the Internet to
    > refresh automatically every 5 minutes. I was thinking along the lines of
    > having a HTML file on my C-drive with JavaScript to do so. It should be
    > possible, Right?
    >
    > I don't know much about JavaScript.[/color]

    you could build a framepage
    and refresh a frame (theirs) from another hidden one(yours)

    something like:

    function reload1(){
    document.parent .frame[1].location.reloa d()
    setTimeout("rel oad1()",300000)
    }
    setTimeout("rel oad1()",300000)

    not tested !!!

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    Comment

    • Mike Johnston

      #3
      Re: Refresh page every 5 minutes

      It's not javascript and I don't know which browsers support it but
      you can put the following in the header:


      <meta http-equiv="refresh" content="600">

      Mike Johnston

      Comment

      • Mjscholey

        #4
        Re: Refresh page every 5 minutes

        You can also use the meta tag in the head ie. <meta http-equiv="refresh"
        content="number of seconds"; url="nextpage.h tml>"

        Comment

        • Liu, Chunyen

          #5
          Re: Refresh page every 5 minutes

          <html><head><ti tle>a title</title>
          <meta http-equiv="refresh" content=300>
          </head>
          <body>
          content
          </body>
          </html>
          [color=blue]
          > -----Original Message-----
          > From: Willem [SMTP:horsy@absa mail.co.za]
          > Posted At: Sunday, June 29, 2003 10:57 AM
          > Posted To: comp.lang.javas cript
          > Conversation: Refresh page every 5 minutes
          > Subject: Refresh page every 5 minutes
          >
          > Can someone tell me how I can get a page(any page) on the Internet to
          > refresh automatically every 5 minutes. I was thinking along the lines
          > of
          > having a HTML file on my C-drive with JavaScript to do so. It should
          > be
          > possible, Right?
          >
          > I don't know much about JavaScript.
          >
          > Thanks for the help.
          >
          >
          > --
          > Willem Van der Mescht
          > horsy@absamail. co.za
          > http://myweb.absamail.co.za/horsy
          > (If there were more horses around
          > the world would be more stabilised)
          >[/color]

          Comment

          • Willem

            #6
            Re: Refresh page every 5 minutes

            Thanks for the efort you've put in to help me. This is perfect.

            Willem Van der Mescht
            horsy@absamail. co.za

            (If there were more horses around
            the world would be more stabilised)

            PS Sorry Lasse, didn't mean to use your E-mail address, it was ment to go to
            the group.


            "Lasse Reichstein Nielsen" <lrn@hotpop.com > wrote in message
            news:adc0bwsb.f sf@hotpop.com.. .[color=blue]
            > "Willem" <horsy@absamail .co.za> writes:
            >[color=green]
            > > Can someone tell me how I can get a page(any page) on the Internet to
            > > refresh automatically every 5 minutes. I was thinking along the lines of
            > > having a HTML file on my C-drive with JavaScript to do so. It should be
            > > possible, Right?
            > >
            > > I don't know much about JavaScript.[/color]
            >
            > Try something like this:
            > --- reloader.html ---
            > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
            > "http://www.w3.org/TR/html4/frameset.dtd">
            > <html>
            > <head>
            > <title>Reloader !</title>
            > </head>
            > <frameset rows="30, *">
            > <frame name="input" src="reloaderIn put.html">
            > <frame name="page" src="about:blan k">
            > </frameset>
            > </html>
            > ------
            >
            > --- reloaderInput.h tml ---
            > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
            > "http://www.w3.org/TR/html4/frameset.dtd">
            > <html>
            > <head>
            > <title>input</title>
            > <script type="text/javascript">
            > var interval = undefined;
            > function go(){
            >[/color]
            parent.frames['page'].location.href= document.forms[0].elements['url'].value;[color=blue]
            > }
            > function start(form) {
            > if (interval) {clearInterval( interval);}
            > var time = parseFloat(form .elements['time'].value);
            > interval = setInterval(go, Math.floor(time *1000));
            > go();
            > }
            > function stop() {
            > if (interval) {
            > clearInterval(i nterval);
            > interval=undefi ned;
            > }
            > }
            > </script>
            > </head>
            > <body>
            > <div>
            > <form target="page" action="" onsubmit="start (this);return false;">
            > <label for="url">URL:< input type="text" id="url"></label>
            > <label for="time">Freq uency in seconds<input type="text"[/color]
            id="time"></label>[color=blue]
            > <input type="submit" value="Go!">
            > <input type="button" value="Stop" onclick="stop() ">
            > </form>
            > </div>
            > </body>
            > </html>
            > ------
            >
            > /L
            > --
            > Lasse Reichstein Nielsen - lrn@hotpop.com
            > Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
            > 'Faith without judgement merely degrades the spirit divine.'[/color]


            Comment

            • Ivan Marsh

              #7
              Re: Refresh page every 5 minutes

              On Tue, 01 Jul 2003 20:58:38 +0200, Willem wrote:
              [color=blue]
              > Thanks for the efort you've put in to help me. This is perfect.
              >
              > "Lasse Reichstein Nielsen" <lrn@hotpop.com > wrote in message
              > news:adc0bwsb.f sf@hotpop.com.. .[color=green]
              >> "Willem" <horsy@absamail .co.za> writes:
              >>[color=darkred]
              >> > Can someone tell me how I can get a page(any page) on the Internet to
              >> > refresh automatically every 5 minutes. I was thinking along the lines
              >> > of having a HTML file on my C-drive with JavaScript to do so. It
              >> > should be possible, Right?
              >> >
              >> > I don't know much about JavaScript.[/color][/color][/color]

              Refreshing an entire page on an interval doesn't require scripting it can
              be accomplished with a straight HTML META tag, the exact syntax of which
              escapes me at the moment.

              <META REFRESH='60000' > Something like that. Anyone have the exact syntax?


              --
              i.m.
              All views, opinions and alleged facts expressed by this tactless moron are
              protected by the constitution of the United States of America and should be
              taken as good natured and friendly unless specifically stated otherwise.

              Comment

              • harinda
                New Member
                • Jul 2006
                • 1

                #8
                just try this out



                window.setTimeo ut(' window.location ="URL"; ',5000);


                :)

                Harinda

                Comment

                Working...