Tell me if this works
| From: | Karl J. Stubsjoen | Date: | Thu, 08 Mar 2001 19:52:41 +0000 |
| Subject: | Tell me if this works | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-43071@lists.php.net to get a copy of this message | ||
I'm using the SetTimeOut function of JavaScript to refresh an image every 3
seconds. The SRC for the image is a PHP page which constructs a valid image
with some text added to the image and returns the image to the colling
Image. This works fine, however the information should be changing every so
often for the image. The value to display in the image is a value being
fetched from a table, that value is changing all the time. The value is set
to the first-time-through value and then subsequent request of the image
remain all the same (the image should be changing and it isn't).
Is this a Javascript issue, browser issue, cache issue???
I've tested it on a couple of different platforms, with no luck. Here is my
JavaScript code:
function GetStat() {
var Image2
Image2 = new Image(185,39)
Image2.src = "GetStat.php"
document.stat1.src = Image2
setTimeout('GetStat()',3000)
status = " "
}
<img name="stat1" src="images/NumberDisplay.png" border=0>
Thanks for the help!