Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This code works in IE4 but not IE5.5 - Why?

Status
Not open for further replies.

starblood

Technical User
Feb 28, 2001
63
GB
I have a webcam page that has an JS refresh of the image. It pre-loads the image into the cache whilst the timer countdowns and then swaps when it hits zero.

Unfortunately this preload function has stopped working on IE5.5/6 even though it works on Netscape and IE4. I think I've isolated the problem down to one function, any one know why it doesn't work in these newer browsers?:

var picname = "function recache() {
var now = new Date();
var camImg = picname + "?" + now.getTime();
cachepic.src = camImg;
}

If you would like to the whole script in action, here is the page:

 
It works fine in my browser (IE6) Regards

Big Dave

davidbyng@hotmail.com


** If I am wrong I am sorry, but i'm only trying to help!! **

 
Hi Dave,

It can be deceptive if you have a fast Internet connection.

It is the preload that is not taking place so when the clock hits zero the new image DOWNLOADS then rather than just swapping from the cached version (that was preloaded during the countdown). This becomes a problem if you are on a 56K modem.

It is a bit like not preloading images for rollovers - place your mouse over a button and it takes a while to change - the webcam image is taking a while to change when the counter hits zero (it should just swap because of the preload of the capture into the cache).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top