########################################## # # # Minimal code to refresh a webcam image # # # # from www.outsideworld.org # ########################################## function refreshIt() { if (!document.images['myCam']) return; document.images['myCam'].src = 'image.jpeg?' + Math.random(); setTimeout('refreshIt()',3000) // refresh every 3000 milisecs; // This last line pauses 3 secs then the function calls itself recursively }