<cfif isDefined("field") and len(field)>
<cfset fileLoc = "file.cfm">
<cfelse>
<cfset field = "Home">
<cfset fileLoc = "index.cfm">
</cfif>
<cfoutput>
<a href="#fileLoc#">
#field#
</a>
</cfouput>
Like this?
> -----Original Message-----
> From: alex poyaoan [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 12, 2006 1:37 PM
> To: CF-Talk
> Subject: zero length string
>
> hi can somebody help me with this
>
> i have this code <cfoutput> <a href="file.cfm">#field#</a>
>
> with this if the #field# returns null or zero length string from a
> database field the link returns to the index. is there a possible way that
> it remains on the same page and if it has a value it it opens the file?
>
> thanks
> alex
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256548
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4