PDA

View Full Version : Question about image push applets


Tybeeware
12-01-2002, 06:21 PM
I am playing around with some javascript for the push / pull image used on webcam sites. When i run one, it never refreshes the image in my browser when I change the image. It only does if I delete the image and then repost it. It seems my browser looks for the cache or something first. How can I make ANY browser force to load the image without deleting it first?

Here is the script I am using:


<SCRIPT>
<!-- ===================
browserType = navigator.appName;
newImage = new Image();
Srvr_IP= "http://127.0.0.1/myFile.jpg?";
var dly;
if (browserType == "Netscape") document.write('<IMG SRC="'+ Srvr_IP +'"

>')
else document.write('<IMG SRC="' + Srvr_IP +'" name=ZahidiTV2Web

Alt="Web Server is off. Please try later." border=1 >');
uniq= 1;
newImage.src= Srvr_IP + uniq;
SnapShot_Loop(4000);
function SnapShot_Loop(delay)


{
dly= delay
if( document.all) loadNewImage();
setTimeout("SnapShot_Loop(dly)",delay);
}
function loadNewImage()


{
Stamp = new Date();
uniq= Stamp.getTime();
document.images.ZahidiTV2Web.src= newImage.src;
newImage.src= Srvr_IP + uniq;
window.status = "Displaying live video ...";
}
</SCRIPT>


<P>
Hello