Thanks!

--Original Message Text---
From: Marlon Moyer
Date: Tue, 13 Apr 2004 08:55:56 -0500

<cfswitch _expression_="#listlast(SESSION.stDirFileName[i],".")#">

--
Marlon Moyer, Sr. Internet Developer
American Contractors Insurance Group
phone: 972.687.9445
fax: 972.687.0607
mailto:[EMAIL PROTECTED]
www.acig.com

> -----Original Message-----
> From: Bushy [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 13, 2004 8:49 AM
> To: CF-Community
> Subject: re: Using <cfswitch and <cfcase
>
> Hi,
>
> I'm displaying a treeview list of files on the server. Currently I'm
> displaying different graphics beside the filename based on the file
> extension.
>
> Below I'm checked the first 4 characters from the right. I would say
98%
> of my files have a three character naming scheme to the right of the
> period.
>
> Ex:
>
> .txt
> .xxx
> .aaa
>
> This is my problem. The other 2% of files have only 2 characters to
the
> right of the period. How can I have the <cfswitch check for only "3"
> characters to the right and also "4" characters to the
> right (see below code) at the same time?
>
> .aa
> .bb
>
> I hope I'm making sense...
>
> <cfswitch _expression_="#right(SESSION.stDirFileName[i],4)#">
>
>         <cfcase value=".inc,.log" delimiters=",">
>           <!--- CHECK FOR .INC OR .LOG EXTENSION --->
>           <cfset icon_image = "images/file-ue.gif">
>           <a href="" here...
>         </cfcase>
>
>
>         <cfdefaultcase>
>           <cfset icon_image = "images/file-ue.gif">
>           <a href="" here...
>         </cfdefaultcase>
>
>        <img src="" border="0">&nbsp;Filename here...</a>
> </cfswitch>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to