You can also use the "onError" attribute in the <img /> tag to show an
alternate image.

It's not a fool-proof, but it does help in some cases.

M!ke

-----Original Message-----
From: Ken [mailto:[EMAIL PROTECTED] 
Sent: Sunday, July 17, 2005 3:34 PM
To: CF-Talk
Subject: Image exists or not

Hi. I am doing a simple query to pull image file names from a table, and
then displaying the images with the <img src>. Problem is: Not all of
the image names in the db are present on the images folder. And I don't
want to show broken images on my page.

I was wondering if i can do a cffile read, and if it generates an error
for a missing file, i catch it with cftry, cfcatch, if not it displays
the image.

I know what to do, but having a problem. Please can someone give me some
code help?

Thanks,
Kenn

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:212080
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to