Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Deal with Image not Found

Need classic ASP code



2:41 am on Dec 14, 2005 (gmt 0)

10+ Year Member

I run a site with classic ASP. One situation is: when a visitor clicks a page with broken image link (no image file at all), the ASP code is able to detect it, and display a "Picture Not Found" or "Picture coming soon" image instead.


IF the picture not exists THEN
disply a image of "Picture coming soon"
'just show the picture

Do you know how to write this code with classic ASP?


1:35 am on Dec 15, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

A possible solution would be to create an ASP page which displays an image based on a url parameter.

EG something like:


then in the code on your view-image.asp page, you could use the filesystem object to test whether the image exists on the server and then show it if it exists and show an alternate if it doesn't.


3:58 pm on Dec 16, 2005 (gmt 0)

10+ Year Member

Use the XMLHttp object to open the image's URL. If object.status = 200, it's there.

(Kinda expensive operation to do everytime someone hits the page tho)


Featured Threads

Hot Threads This Week

Hot Threads This Month