PDA

View Full Version : Call a function every hour?



travisf
10-03-2007, 08:03 PM
Hey,

I don't know too much about javascript but i am trying to make this rss reader on a vista gadget (found here: http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm )but i want to have it refresh automatically every hour.

It gives instructions that the refresh function can be called with a hyperlink

<a href="javascript:socialfeed.init()">Refresh Feed Contents</a>


but how can i have this socialfeed.init() function trigger every hour- or whatever i specify? Any suggestions?

Thanks so much!

T

Twey
10-03-2007, 08:39 PM
<script type="text/javascript">
setInterval(function() { socialfeed.init(); }, 3600000);
</script>

travisf
10-03-2007, 09:06 PM
Wow, Thanks! it works. Easier than i thought. Thanks!