From: "sebastian palmigiani" <[EMAIL PROTECTED]>
> I don't know if this is possible. I just know I can't figure out how to do
> it.
>
> I want to dynamically determine whether the <cfoutput> tag has a query
> parameter.
>
> The following does not work but shows what I want to do:
>
>
> <cfoutput <cfif IsDefined("URL.Message")>
>
> <cfelse>
> query="ShowMemberInfo"'
> </cfif>
>
I understand you to mean that you want to
<cfoutput query="ShowMemberInfo">
depending on whether
IsDefined('Url.Message') <!--- notice the single quotes --->
returns a yes or no
correct?
if so, then
<cfif (IsDefined('URL.message'))>
<cfoutput query="ShowMemberInfo">
....
</cfoutput>
<cfelse>
<cfoutput>something else </cfoutput>
If you want the output to depend on the value of URL.message,
then
<cfif(IsDefined('URL.message'))>
<cfswitch expression="#UCASE(URL.message)#">
<cfcase value="HELLO">
<cfoutput>Goodbye</cfoutput>
</cfcase>
<cfcase value="SHOW ME THE MEMBER LIST">
<cfoutput query="ShowMemberInfo">
......
</cfoutput>
</cfcase>
<cfdefaultcase>
<!--- URL.message exists, but it doesn't make sense --->
<cfoutput>Huh?</cfoutput>
</cfdefaultcase>
</cfswitch>
<cfelse>
<!---- URL.message doesn't exist ---->
<cfoutput>I don't know what to do.</cfoutput>
</cfif>
Notice the UCASE --- parsing input will drive you nuts unless
you provide for exceptions to case, spelling, completeness
of keywords inclusion, pre and post trimming, etc.
Sorting coding flow can be clearer if dependent factors
are differentiated from independent factors. At least
part of the necessary clarification.
Pan
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.