View Full Version : Random Image-- Image not loading

03-21-2007, 06:51 PM
Look at the www.sweets-n-treats.com source

I am almost finished with a website that I did for Sweets & Treats, but the random image script will not bring up the files (hence the blank box in the middle). It did off line, so I messed the addresses and what-not. The other javascripts work on the site, but not this one =(

The irony is that it's such a simple script! :p

Anyone know what's wrong with it?


03-21-2007, 07:14 PM
You need the http protocol at the beggining of each image source.

03-23-2007, 07:31 PM
Good suggestion, but it didn't work. . .
It still is not finding the images =(

I also tried "./" instead of "http://www.sweets-n-treats.com/", but that did not work either. Any other ideas?

03-23-2007, 08:10 PM
If you are talking about files like this one:


You have it listed as:


Upper and lower case matter on the web.

03-23-2007, 10:57 PM

Nowadays people want webpages that work. You really shouldn't use .bmp (bitmaps) anymore; they don't compress the filesize.
.bmp take longer to load!

try this logo attached. It is a .gif version of your .bmp.

Your .bmp was 700kb, the .gif is 20kb. See the difference? Thats 3500% difference!

You won't notice the difference when testing offline because the image is fetched from your computer, not the server.


03-24-2007, 01:31 AM
GIF is usually for animated images.

03-24-2007, 01:50 AM
In your posts you should be more constructive.

I would recomend using .png for static images. .gif are used for moving images.

But thanks for the heads up.


03-24-2007, 05:07 PM
Thanks everyone! You all were really helpful, but I figured it out. It was the .JPG instead of .jpg, as you all said, but I figured it out before I read the posts, so I can keep some pride.

I though I knew HTML better then that. . .

Thanks again!