G
Geoff Cox
Hello,
I am still having problems - apologies if the answer is in previous
postings!
I now have, in the header,
<sctipt>
var myimages=new Array();
function preloadimages();
{
for (i=0;i<preloadimages.arguments.length;i++)
{
myimages=new Image();
myimages.src=preloadimages.arguments;
}
}
</script>
and
<body
onload="preloadimages('before-and-after.gif','pic1.jpg','pic2.jpg',
'pic3.jpg','pic4.jpg','pic5.jpg','pic6.jpg','pic7.jpg')">
The above is in the first page where only the first image above, the
before-and-after.gif image, is displayed.
The rest are displayed in the second page linked to the first and are
shown by using an array
var picture = new Array(7);
picture[0] = "pic1.jpg";
picture[1] = "pic2.jpg";
picture[2] = "pic3.jpg";
picture[3] = "pic4.jpg";
picture[4] = "pic5.jpg";
picture[5] = "pic6.jpg";
picture[6] = "pic7.jpg";
and then displayed using typical code as follows
document.getElementById('picture').innerHTML
= "<img src=" + window["picture"][situation_number] + ">";
I am finding that the first 3 jpg images are displayed quickly in the
second page (presumably from the IE v6 cache), but the others 4 are
only downloaded when the second page gets to the point where they are
to be displayed.
Am I wrong somewhere? Where can I look to see which images, if any,
have been preloaded into the browser cache? The use of the picture
array is possibly wrong or redundant??
Cheers
Geoff
I am still having problems - apologies if the answer is in previous
postings!
I now have, in the header,
<sctipt>
var myimages=new Array();
function preloadimages();
{
for (i=0;i<preloadimages.arguments.length;i++)
{
myimages=new Image();
myimages.src=preloadimages.arguments;
}
}
</script>
and
<body
onload="preloadimages('before-and-after.gif','pic1.jpg','pic2.jpg',
'pic3.jpg','pic4.jpg','pic5.jpg','pic6.jpg','pic7.jpg')">
The above is in the first page where only the first image above, the
before-and-after.gif image, is displayed.
The rest are displayed in the second page linked to the first and are
shown by using an array
var picture = new Array(7);
picture[0] = "pic1.jpg";
picture[1] = "pic2.jpg";
picture[2] = "pic3.jpg";
picture[3] = "pic4.jpg";
picture[4] = "pic5.jpg";
picture[5] = "pic6.jpg";
picture[6] = "pic7.jpg";
and then displayed using typical code as follows
document.getElementById('picture').innerHTML
= "<img src=" + window["picture"][situation_number] + ">";
I am finding that the first 3 jpg images are displayed quickly in the
second page (presumably from the IE v6 cache), but the others 4 are
only downloaded when the second page gets to the point where they are
to be displayed.
Am I wrong somewhere? Where can I look to see which images, if any,
have been preloaded into the browser cache? The use of the picture
array is possibly wrong or redundant??
Cheers
Geoff