I am preloading images to use later. This workd fine. I would like to show a progress bar while the images are preloading. I have 8 images to preload.
In the body I placed an image and named it “ProgressBar”. I created 10 jpegs each a little longer than the previous that make up the progress bar. ProgressBar1.jeg is the 10% image and ProgressBar2.jpeg is the 20% progress bar image and so on.
My problem is that when I replace the original image with the 20% image nothing happens. It doesn’t show up. I do not get an error.
Here is the actual code ( it is in the body section) :
<img src=”Images/progressbar1.jpg” name=”ProgressImage” width=”12″ height=”12″ id=”ProgressImage”>
<script language=”javascript”>
image01= new Image();
image01.src=”Images/portfolio_ images/DSCN0481.JPG”;
document.images.ProgressImage.src=”Images/progressbar2.jpg”;
</script>
The main image “image01” preloads properly but the progressbar image does not load.
Am not sure why. Any ideas would be greatly appreciated.
TIA