quote:
Originally posted by Jesus
However, the populateDp() function in the script already checks that only files with a jpg, gif, bmp or png extension are added to the array. So in this case you won't encounter filenames without an extension.
Oh, I see. If I knew that, I would have made it in just one line like you did, and made a new function if I wanted to add more to it.
I'm not using this an excuse, but I
only tried to figure out how to use the fileName variable, and worked from there.
Topic starter: I already gave you a solution which should work, but also I suggest that you use Jesus' code. I am sure you have already figured out by now the best way for you to do it though.