Thanks Tim;

That worked exceptionally.  And yes I am using the database as well however,
this is a backup for any absent minded store owner who forgets to put the
imagename in the DB or they place it in the db wrong.


----- Original Message -----
From: "Tim Painter" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, September 09, 2002 8:23 AM
Subject: Re: CFDirectory Question


> FileExists():
>
> <cfif FileExists("images/#sku#.gif")>
>     <img src="images/#sku#.gif">
> <cfelseif FileExists("images/#sku#.jpg")>
>     <img src="images/#sku#.gif">
> </cfif>
>
> Though I'd prefer Tonys method, so you don't have to do a lot of file
checking.  We use it a lot on a app here and  haven't run into any
performance problems, but a database solution would or course, be better.
>
> Tim P.
>
> ----- Original Message -----
> From: "Larry Juncker" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, September 09, 2002 9:10 AM
> Subject: CFDirectory Question
>
>
> > I have a shopping cart that I have created and the images can be either
gif
> > or jpg.
> >
> > Since I am dynamically pulling from the images folder, how can I check
to
> > see which image exists for a particular item.
> >
> > I am currently doing this:
> >
> > <img src="images/#sku#.gif">
> >
> > I need to be able to see if #sku#.gif exists or #sku#.jpg and then
display
> > the proper image.
> >
> > Any help would be greatly appreciated.
> >
> >
> 
______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to