When asking for an image that is not available what is the value that gets stored in document.(image name) ? Is it null? Any thoughts.
Actually, what I am refering to is that I have a script to go out and grab an image sorta like a photo album and it just keeps grabbing the next image etc if the user hits the forward button. However, it would be nice to know when the image is not there. Otherwise it shows the little X and gets really messed up. Here is the URL http://www.uwplatt.edu/~sigeps/photo.html
Are you trying to test if an image exists?
The following example should clarify things:
if (document.images.pic1 == null)
If you place the above in a blank page the first alert will say "undefined". However the second will come up with "1", meaning that if you try to access an image that does not exist, the value returned will be null. This should also be true if you use the following syntax:
alert(document.images[num]) and alert(document.images['name']) since the return value of an out of bounds array element (regardless of type) is null