views:

44

answers:

3

Hi All,

I have an output page like this

<!-- some css -->
<!-- some js -->

the body of content is here

unfortunatelly the css & js is always included before content body. how can we remove the css and js so the output is just content body?

I can't change the way how css & js rendered in the page because it's part of the framework

thank you

+3  A: 

Place a <cfcontent reset="true" /> right before your content. That'll flush the output buffer.

scrittler
This will work (good idea to set `type="text/json"` also), but the better solution is to use different layouts to avoid the problem in the first place.
Peter Boughton
thank you scrittler, its work :D
tsurahman
A: 

Put

<cfsetting enableCFoutputOnly = "Yes">

On the top of the page. Then use <cfoutput></cfoutput> whenever you want output.

For ColdFusion, it's CFML reference helps us a lot.

Take a look on that.

Vikas
You linked to what is possibly the *oldest* documentation that's still online for ColdFusion! You can always find the latest docs at: http://help.adobe.com
Adam Tuttle
+1  A: 

Are the CSS / JS in between <head></head>? If so, do a cross-file search (like.. using Eclipse) to search for all .cfc & .cfm files for <cfhtmlheader>.

FYI, if you use <cfform> or other ajax tags from CF8+, CF will inject some css and JS on the top of the page...

Henry