preloading images...



i found this script on the internet (i simplified it a little) and i have
two questions:

<script language=javascript>
var preloadimages=new
var theimages=new Array();

for (p=0;p<preloadimages.length;p++){
theimages[p]=new Image();

Q1: i want to use preloading for images that opens in popUp window. when i
click on the little thumb, larger pic opens in the popUp and i would like to
preload this larger pic. is it posible or does it use only for rollover
pics, i mean pics that open on the same page (not in popUp)?

Q2: if i previously used link on main page i.e.'/html/images/pic1.jpg','','properties'), should i change that
whit this one'/html/images/theimages[p].src','','properties')
or would it work like it was? i mean should i change names of the pics
"pic1.jpg","pic2.jpg","pic3.jpg","pic4.jpg","pic5.jpg"...etc with preloaded
array "theimages[0].src","theimages[1].src","theimages[2].src",...etc.
thank you!


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question