-----Original Message-----
From: Bushy [mailto:[EMAIL PROTECTED]
Sent: 22 October 2003 12:20
To: CF-Talk
Subject: Using <cfswitch, <cfcase
Hi,
Whats wrong with the code snippet below? I'm using <cfdirectory
to list the contents checking the file extension. On the <a href I've
removed my JS which causes a popup window to appear just to
make it easier to read.
I get a context validation error in tag CFSWITCH.
<cfif (Right(SESSION.stDirFileName[i],5) is ".xxx~")>
<cfelse>
<cfoutput>
<tr height="20">
<td>#indent#</td>
<td valign="middle" width="100%" height="20"
class="dirlinks">
<cfswitch
_expression_="#right(SESSION.stDirFileName[i],4)#">
<cfcase value=".aaa">
<cfif ListFindNoCase(URLDecode(dir),"mywork","\")>
<a
href=""> <cfelse>
<a
href=""> </cfif>
</cfcase>
<cfcase value=".bbb">
<a
href=""> </cfcase>
<cfcase value=".ccc,.ddd" delimiters=",">
<a
href=""> </cfcase>
<cfcase value=".eee">
<a
href=""> </cfcase>
<cfcase value=".fff">
<a
href=""> </cfcase>
<cfcase value=".ggg">
<a
href=""> </cfcase>
<cfcase value=".hhh">
<a
href=""> </cfcase>
<cfcase value=".iii">
<a
href=""> </cfcase>
<cfcase value=".jjj">
<a
href=""> </cfcase>
<cfcase value=".kkk,.lll" delimiters=",">
<a
href=""> </cfcase>
<cfcase value=".mmm,.nnn,.ooo,.ppp" delimiters=",">
<a
href=""> </cfcase>
<cfcase value=".qqq,.rrr" delimiters=",">
<a
href=""> </cfcase>
<cfdefaultcase>
<cfset icon_image = "images/file1.gif">
<cfset ra_image = "images/file2.gif">
</cfdefaultcase>
#SESSION.stDirFileName[i]#</a>
</td>
</tr>
</cfoutput>
</cfif>
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

