26 Oktober 2009

how to refresh a page periodecally using javascript

There are several ways to refresh a page in a given time period. Just try googling it, you'll find that several ways. This is how i refresh my page using javascript:

<script language="Javascript">
  setTimeout("refresh()",60000);
  function refresh() {
    // my function logic here
    setTimeout("refresh()",60000);
  }
</script>

This example refresh/re-call a function every 60 second, and it called recursively.
I think this is quite simple to understand. So if you failed to refresh your page using some ways, try using this way. It works to me, and hopefuly for you too.. :)
good luck!

3 komentar:

  1. ohh...gitu yah??
    kayanya bagus,
    pinjem dunk film'nya...

    BalasHapus
  2. bagus emang...
    tapi aku yakin km lbh tertarik nonton Bontang FC, hihihi!

    BalasHapus
  3. hmmmm .... hmmmm ... hmmmm ...

    BalasHapus