WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 xloadtree - proloading of images (icons), Petter, June 20, 2005

Subject: xloadtree - proloading of images (icons) From: Petter Date: June 20, 2005

Hi !

I'm using xloadtree. I have a tree with about 50 nodes which all have the same image as icon. But, I notice that even though it's the same image, it's loaded 50 times..

I have tried to put this function in the HEAD part of my HTML page.

<script type="text/javascript">

function preloader()

{

// counter

var i = 0;

// create object

imageObj = new Image();

// set image list

images = new Array();

images[0]="R.gif"

images[1]="S.gif"

images[2]="W.gif"

images[3]="Tplus.gif"

images[4]="Tminus.gif"

images[5]="I.gif"

images[6]="L.gif"

images[7]="Lminus.gif"

images[8]="Lplus.gif"

images[9]="E.gif"

// start preloading

for(i=0; i<=9; i++)

{

imageObj.src=images[i];

}

}

</script>

...

...

</head>

<body onLoad="javascript:preloader()">

 

But it doesn't work.. The image is still loaded 50 times..

 

Any ideas or tips would be greatly appreciated !!

Regards,

Petter Kjeilen




Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX