another CF ?

They have: 8 posts

Joined: May 2000

Ok, I have another one.

I checked Allaire Documentation for <cfswitch> tag. In their exapmle, they use this tag within <cfoutput>. However, when its run on the server, the following error message is generated:

Error processing CFOUTPUT tag

The tag CFswitch was parsed from within a CFOUTPUT section. This tag is not valid within CFOUTPUT sections. The tags which are valid in this context are:

CFSET

CFIF

CFELSEIF

CFELSE

If you wish to iterate over Cold Fusion tags other than the ones listed above you should use the CFLOOP tag.

-----------

But the documentation insists that this way you can avoid using <cfloop>. I am just trying to understand, I am pretty new to ColdFusion

TIA

They have: 89 posts

Joined: Sep 1999

Allaire documentation is...lacking in many areas.

I have never, ever used cfswitch. I guess it is just personal preference, but I always check values with <cfif><Cfelse>, etc. Let me know what you are trying to do and maybe I can offer another solution.

They have: 8 posts

Joined: May 2000

You are right, CFIF/CFELSE works just fine. I was playing with the tags in CF 4, but didn't realize that our test server is only 3 - hence the confusion.

:::

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.