Well, first off, what's this line:

<CFIF #CMFileName# & "" IS NOT "">

Do you mean...

<cfif #Trim(CMFileName)# gt 0>

..which essentially checks to make sure CMFileName has something
greater than a zero-length?


Secondly:

<CFSWITCH EXPRESSION="RIGHT(#CMFileName#,3)">

Do you mean to have the expression be...

#Right(CMFileName, 3)#

..?

Those are the first things that strike my eye.

--D


###################
David Notik
Digital202, LLC
Imagination gone digital.
Web: www.digital202.com
E-mail: [EMAIL PROTECTED]
Office: (206) 575-1717
Mobile: (206) 351-3948
###################


-----Original Message-----
From: Russ [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 18, 2002 8:06 PM
To: CF-Talk
Subject: Using a CFIF on RIGHT(#value#, 3)

I have a page set up so that when a user logs in, they're allowed to
click links to view images or documents.

I have a pop-up and resize function set to work, but this is only going
to work for .jpg and .gif images (that's all; we're going to use to keep
it fairly simple).

For everything else, I'd rather just have a "simple" link so that if a
person chooses to view a PDF, download an .eps, or even RTF docs.

That said, I'm failing miserably with my code.

Here's what I have:

<cfoutput>
<CFIF #CMFileName# & "" IS NOT "">                            
  <CFSWITCH EXPRESSION="RIGHT(#CMFileName#,3)">
    <CFCASE VALUE="jpg,gif">
      <LI Class="bullet"><a href="##" class="NavyCopy"
onClick="MM_openBrWindow('clientItemView.cfm?CN=#clientName#&amp;CMFN=#C
MFileName#','clientImage','width=1024,height=768')">#CMFileText#</a>
</LI>
    </CFCASE>
    <CFDEFAULTCASE>
      <LI Class="bullet"><a
href="clients/#clientDirectory#/#CMFileName#"
class="navycopy">#CMFileText#</a></LI>
    </CFDEFAULTCASE>
  </CFSWITCH>
</CFIF>
</cfoutput>  

So far, the links are only work for the CFDEFAULTCASE, and I'm not sure
what I'm missing.  Anyone have any insight?

Thanks,

Russ



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

Reply via email to