View Full Version : image loading
hmbrglr
08-11-2002, 07:28 AM
i have like 386421634 images that i want all on one page but i dont wanna type the image code then put in the name of every picture over and over you know, so how can i make it so that i just load the pictures to a cetain directory and it puts them up?
premshree
08-11-2002, 03:27 PM
Try this :
<script language="JavaScript">
function writeImg(imgArrLength)
{
for(var i=0; i<imgArrLemgth; i++)
{
document.write('<img src="image' + i + '.gif">');
// Other statements also.....
}
}
</script>
The name of the images must be image0, image1, image2.........
If, you cannot change the image names, then there is a way to list all the images of the directory using VBScript, but I am not sure how to go about it.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.