This would work even though it is not this other language is the site is a
CF site?

Also I am not quite clear.

If I am reading this right the logic should break down like this:

*************
<!---If image is listed and exists--->
        if ( intImagePos EQ 3 ){
        WriteOutput("<td class=""ProductImage"">" & Chr(10) & Chr(13));
        //'show image
        if( Len(objProduct.getImage2()) GT 0 ){
        writeoutput("<img src=""" & objProduct.getImage2() & """ " &
        objProduct.getImage2Params() & ">");
<!---If image is listed and does not exist---> 
        ?????????????
<!---If image does not exist--->
        }else{
        writeoutput("<p>No Picture Available</p>"); }
        WriteOutput("</td>");
*************

Or are you saying that this should be structured a different way.
Excuse my ignorance as I am a total newbie and this is my first real attempt
at logic manipulation.

Can you explain further?


Robert P. Reil
Managing Director,
Motorcyclecarbs.com, Inc.
4292 Country Garden Walk NW
Kennesaw, Ga. 30152
Office 770-974-8851
Fax 770-974-8852
www.motorcyclecarbs.com 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 27, 2006 8:14 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Alternate image shown logic help?

You can use FileExists(absolute_path) in an if statement.

Eg. 
<cfif FileExists("C:\www\images\picture.gif")>
        <img src="C:\www\images\picture.gif">
<cfelse>
        <img src="C:\www\images\no_picture.gif">
</cfif>

Chris

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Reil
Sent: Thursday, July 27, 2006 7:28 AM
To: discussion@acfug.org
Subject: [ACFUG Discuss] Alternate image shown logic help?

Is there a way to have an alternate image called if an image called does
not exist?

For example:
We call out the image path for the image as if it would one day be
there.
When we shoot an image as it comes into inventory we place the image in
the correct directory, and name it the part number.jpg.

We would like to have a default image show if the correct image does not
exist.

Using the string:
******************
//'display the right product image
        if ( intImagePos EQ 3 ){
        WriteOutput("<td class=""ProductImage"">" & Chr(10) & Chr(13));
        //'show image
        if( Len(objProduct.getImage2()) GT 0 ){
        writeoutput("<img src=""" & objProduct.getImage2() & """ " &
objProduct.getImage2Params() & ">");
        }else{
        writeoutput("<p>No Picture Available</p>"); }
        WriteOutput("</td>");
*******************
How would you modify this to be able to do that?

I can see that it would be easy to change 
        }else{
        writeoutput("<p>No Picture Available</p>"); to show a path name
but it is VERY easy to add the file name even if it does not exist up
front.

Im thinking that instead of changing
        }else{
        writeoutput("<p>No Picture Available</p>"); I should use elseif
logic (hmm this is not even CF is it?) To say if the pic is not
available then call a certain image.
If that is not there then do
        }else{
        writeoutput("<p>No Picture Available</p>");

Robert P. Reil
Managing Director,
Motorcyclecarbs.com, Inc.
4292 Country Garden Walk NW
Kennesaw, Ga. 30152
Office 770-974-8851
Fax 770-974-8852
www.motorcyclecarbs.com 


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists Archive @
http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------







-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------




-------------------------------------------------------------
To unsubscribe from this list, manage your profile @ 
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------



Reply via email to