Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1657 Is it possible to auto-refresh an image every X seconds?

irt.org | Knowledge Base | JavaScript | Image | Q1657 [ previous next ]

Q1657 Is it possible to auto-refresh an image every X seconds?

Try:

<html>

<head>
<script language="JavaScript"><!--
function refreshIt() {
   if (!document.images) return;
   document.images['myCam'].src = 'myCam.gif?' + Math.random();
   setTimeout('refreshIt()',5000); // refresh every 5 secs
}
//--></script>
</head>

<body onLoad=" setTimeout('refreshIt()',5000)">

<img src="myCam.gif" name="myCam">

</body>

</html>

Feedback on 'Q1657 Is it possible to auto-refresh an image every X seconds?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.