Forum Moderators: open
I experience the following problem with image changing in Opera 7.50. I need to change image _preloading_ (to save bandwidth), but intead display it by user request when he/she clicks the link. While the image is being loaded a small .gif like "loading ..." is displayed. Once the image is loaded it is displayed.
To change image I assign its src property to the image on the server like this:
document.images['my_image'].src = 'some_image.jpg';
This method works well in Firefox 1.0, IE 6.0, Opera 8 beta, but fails in Opera 7.50+.
If instead I preload the image like this:
var img = new Image();
img.src = 'some_image.jpg';
and later make assignment
document.images['my_image'].src = img.src it works well in Opera 7.50 as well.
So, is it a known issue and is there way to resolve it?
Thanks in advance.
I think it should work good luck to you