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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if image loaded correctly

Status
Not open for further replies.

vascobrito

Technical User
Feb 27, 2003
28
PT
Hi there,
i have a page with 3 images in it. The name of one of the images depend on the current day (ex: image20041031.gif).
no trouble in there. some times the file isn't there for a while, and i need to load an alternative image if the first one isn't there.
i'm using "getElementById" and "getElementsByTagName" to set the SRC of the IMG tag after checking the date to determine the file name, but if the file isn't there , i get those stupid crosses in place of the image.

resuming, i need to check if the image loaded correctly and if not, load an alternative image.

thanks for any help
 
Firs of all, i want to apolagise for the thread since i done it wrong. I post the thread and then search a bit more on the forum. so, i found what i was looking for.
thanks
thread closed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top