I am working on a web site where the original developer set
the photos of
students to be dynamic based on their student id number. When
their photo is
taken, it gets assigned the student id number, so it can be
referenced, and
put into a student photo directory.
however, if the photo does not exist the area comes up with
the missing
photo 'x'. Is there a way to find out if the photo actually
exists and, if
not, put a alternate image in its place using cfif or another
evaluation cf
tag?
Here is the way it is set currently:
<IMG
src="../../images/stuPhoto/#Right(People_code_id,9)#.jpg"
width="100"
height="100" alt="#first_name# #Last_Name#">
I need to figure out a way to say
<cfif photo exists>
<IMG
src="../../images/stuPhoto/#Right(People_code_id,9)#.jpg"
width="100"
height="100" alt="#first_name# #Last_Name#">
<cfelse>
<IMG src="../../images/stuPhoto/#nophoto.jpg" width="100"
height="100"
alt="#first_name# #Last_Name#">
</cfif>