img object and appendChild problem

B

Bob

Hi everyone,
I have encountered a problem with "img" object and appendChild

Code:
--------------
var oX = document.getElementById("imm")
for (i=0; i<50; i++)
{
oImg = document.createElement("img")
oImg.src = "/media/logoSm.gif"

oX.appendChild(oImg)
}
--------------

when put on server (IIS 5) it loads image from the server 50 times like it
does not cache anything (file is in the cache actually)

I don't know whether this is server or browser problem (on mozilla it works
fine, but that is not the solution I am looking for)

please check it online http://www.cyberzeka.com/test/t1.asp
on this page first two images are plain html img tags and they load just
fine... except the following 50

"Enable content expiration" is turned off

I need this to write a long table dynamicaly with a lot of graphical buttons
for each row (no matter how small they are they will have to be loaded 50
times on every refresh)

Any suggestions?

wrangling like "document.write" is not a good solution
also inner/outerHTML wrangling are not working ...

Thanks,
Bob
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top