Author Topic: javascript not updating images in IE7 or IE8  (Read 1612 times)

0 Members and 1 Guest are viewing this topic.

Offline SoMDWx

  • Forecaster
  • *****
  • Posts: 1019
    • Southern Maryland Weather
javascript not updating images in IE7 or IE8
« on: September 24, 2009, 10:37:11 AM »
All,
  I am trying to update images using the following code snippet. It works great under IE6 but IE7 and IE8 don't like it . I don't get any error messages, it just doesn't update the images.... Clues? suggestions?


<script type="text/javascript">
var timerID = 0;
var camImage = 'http://radar.weather.gov/ridge/Thumbs/LWX_loop_tb.gif';
var webImage = 'FTPPush02-cache.jpg';

var intervalTime = 1000;
var refreshIntervalSeconds = 60;
var secondsLeft = refreshIntervalSeconds;

function loadImages() {

  if (secondsLeft > 0) {
     secondsLeft = secondsLeft - 1;
 window.status = secondsLeft;
  } else {
  document.radarImg.src = camImage;
  document.webImg.src = "http://www.somdweather.com/resize-webcam-image.php";
  secondsLeft = refreshIntervalSeconds;
  }

}
function startClock() {
  timerID = setInterval("loadImages()", intervalTime); }

</script>


Jim