0

Hi,
I have got a script to refresh a single image but I want the user to be able to change the refresh rate of the picture by clicking a link. I have tryed the following code:

<p><IMG src="http://rc-xbot.ath.cx/webcam.jpg" width="320" height="240" border="1" name="refresh">
  <SCRIPT language="JavaScript" type="text/javascript">
      <!--
	  function Change(t) {
	  var t = 2
      image = "http://rc-xbot.ath.cx/webcam.jpg"
      function Start() {
      tmp = new Date();
      tmp = "?"+tmp.getTime()
      document.images["refresh"].src = image+tmp
      setTimeout("Start()", t*1000)
      }
      Start();
	  }
      // -->
      </SCRIPT>
</p>
<p><a href="javascript:Change('2')">2</a> <a href="javascript:Change('10')">10</a></p>

But that refreshes the image once when the user clicks on the link.
Thanx in advance
Sam Rudge

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by ~s.o.s~
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.