If the pages are really .html and you don't have the extension mapped to CF,
then it won't execute.  If you pull the code out of a database, or use
CFFILE to read files containing code then <cfoutput> it to the page, it
won't execute.

Now what becomes an issues is how to get the code to _display_ correctly on
browser end.  If you had something like <cfset x = 1> within your page, and
it doesn't get executed server-side, a browser will see this as an HTML tag
(because of the brackets) and will discard it as an errant tag.  You need to
use something like HTMLCodeFormat(), which escapes the angle brackets.

Beyond that, check the tag gallery.  There may be custom tags that also
color code the CF ala Studio, which would make displaying the code that much
nicer.

Jim


----- Original Message -----
From: "Andrew Peterson" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Tuesday, January 30, 2001 2:16 PM
Subject: Re: Dumb Questions :-)


> Excellent! With this precedent set, I can now ask all the stupid questions
I
> have without impunity by prefacing them with "My manager wants", such as:
>
> My manager wants me to write a brief html/cfm/js tutorial in an html page.
> To prevent such code from executing, so that it may be displayed "as is,"
I
> thought that I could surround said code with "pre" tags. But alas, no. How
> does everybody *do* this?
>
> Thanks,
> Andy


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to