Re: [newbie] setTimeout, what's wrong?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: [newbie] setTimeout, what's wrong?

From: Tim Williams <saxifraxREMOVE@THISpacbell.net>
Date: Sun Nov 13 2005 - 21:40:31 CET

".:|:." <@.> wrote in message news:dl7ien$1tr$1@domitilla.aioe.org...
> Hi, I'm trying to refresh every 2 seconds an image from a
> webcam.
> My page works fine only in Internet Explorer. The image
> doesn't refresh in Firefox and Opera. The javascript options
> in both browsers are set to accept everything.
> This is my page:
> http://tinyurl.com/72ln4
> What am I doing wrong?
> Thanks!

Try this instead of what you have:

<script type="text/javascript">
var wait;
function reload()
 {
 var picSrc = "http://213.171.96.200/cgi-bin/jpg/image.cgi?x=";
document.getElementById("webcam").src=picSrc + escape(new Date());
 wait=setTimeout("reload()", 2000);
 }
</script>

Tim.
Received on Mon Nov 21 03:28:06 2005