Thank you,
However if I don't use 2 </CFIFF> at the end of each I get error:
Error: Context validation error for tag CFIF. The start tag must have a
matching end tag. An explicit end tag can be provided by adding </CFIF>. If
the body of the tag is empty you can use the shortcut <CFIF .../>.
The error occurred on line -1.
Thanks again,
Lisa
At 12:53 PM 10/16/05 +1000, you wrote:
>Actually you are trying to close the cfif whith 2 close tags it should be
>
><CFSET mode = "directory">
><CFIF IsDefined("url.cat_id") IS True>
> <CFIF #url.cat_id# IS "103">
><CFELSE>
><CFSET mode = "category">
></CFIF>
>
>And not
>
><CFSET mode = "directory">
><CFIF IsDefined("url.cat_id") IS True>
> <CFIF #url.cat_id# IS "103">
><CFELSE>
><CFSET mode = "category">
></CFIF></CFIF>
>
>Also you can actually shorten your code to this
>
><CFSET mode = "directory">
><CFIF IsDefined("url.cat_id")>
> <CFIF #url.cat_id# eq "103">
><CFELSE>
><CFSET mode = "category">
></CFIF>
>
>
>
>Regards,
>Andrew Scott
>
>Quote of the Day:
>Abe: Welcome home, son. I broke two lamps and lost all your mail. What's
>wrong with your wife? Homer: Never mind, you wouldn't understand. Abe:
>Flu? Homer: No. Abe: Protein deficiency? Homer: No. Abe:
>Pneumonoultramicroscopicsilicovolcanoconiosis? Homer: No. Abe:
>Unsatisfying sex life? Homer: N -- yes. But please, don't you say that
>word! Abe: What, seeex? What's so unappealing about hearing your elderly
>father talk about sex? I had seeeeex.
>-----Original Message-----
>From: Lisa Deemy [mailto:[EMAIL PROTECTED]
>Sent: Sunday, 16 October 2005 11:53 AM
>To: CF-Newbie
>Subject: cfelse or cfelseif or neither
>
>Any help or input on this would be appreciated.
>
>I'm calling selected information from a database. There are several
>categories and subcategories.
>I want to call an entire category and list its subcategory contents for the
>user.
>I think the problem is in this part of the code as cfelse only appears 3
>times in the entire code.
>
>This (and other code) works to call all of category 103:
>
><CFSET mode = "directory">
><CFIF IsDefined("url.cat_id") IS True>
> <CFIF #url.cat_id# IS "103">
><CFELSE>
><CFSET mode = "category">
></CFIF></CFIF>
>
>I added this (and other code) to collect the same type of information form
>category 100:
>
><CFSET mode = "directory">
><CFIF IsDefined("url2.cat_id") IS True>
> <CFIF #url2.cat_id# IS "100">
> <CFSET mode = "subcategory">
><CFELSE>
><CFSET mode = "category">
></CFIF>
></CFIF>
>
>The error I'm getting is:
>
>QueryString:
>Error: Context validation error for tag CFELSE. The tag must be nested
>inside a CFIF tag.
>The error occurred on line -1.
>
>My questions are: 1. Do I need the syntax of using the 2 parts together
>different that just using one?
>
>2. It appears I can't use <cfelseif > as it doesn't seem to like the < >
>inside it's own < > tags.
>
><CFIF Condition><CFELSEIF Condition><CFELSE></CFIF>
>
>Thanks,
>Lisa
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Studio MX from House of Fusion, a Macromedia Authorized Affiliate and
support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=50
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1440
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54