Refresh web page

Discussion in 'Web Design & Coding' started by omg its nlm, Feb 10, 2004.

  1. omg its nlm

    omg its nlm lvl 17 Hax Folding Team

    Messages:
    1,829
    Location:
    Minnesota
    Anyone out there know the code to auto refresh a webpage every 20secs.

    Thanks
     
  2. omg its nlm

    omg its nlm lvl 17 Hax Folding Team

    Messages:
    1,829
    Location:
    Minnesota
    i am using this to stream my web cam, is there just a way to refresh the pic and not the entire page?

    I figure out how to refresh the page
     
  3. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    It's doable, but it'll **** up any compliancy you have ;)

    Head
    Code:
    <script type="text/javascript">
    function refresh_image() {
        document.imgWebCam.src = "images/webcam.jpg"
        setTimeout("refresh_image()",15000);
    }
    </script>
    Body
    Code:
    <body onLoad="refresh_image();">
    Anywhere
    Code:
    <img src="images/webcam.jpg" alt="Cam" />