Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Putting all images in a folder on preloading

Status
Not open for further replies.

dakkarin

Instructor
Nov 11, 2005
76
TR
Hi I have a problem with javascript
I'm trying to make a preloading with putting onload function to body part of html but what i want to do is taking all images in /htmlroot/images folder to a javascript array because i dont want to write the name of jpg file to my .js everytime when i add a new picture is something like that possible
i mean is something like that possible if it is how?
for (var i=0;i<count(/images/*.jpg);i++)

Liars Do Not Fear The Truth If There Are Enough Liars
 
Somehow you're going to have to list the names of the pictures on the page for Javascript to be able to read them. Javascript can't read the information from the server in the example you provided, like your PHP code can.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top