Ray, can you (or any of your other guys) give me an example of how to code to "check the requested file" ???
And I'm not sure what file I'm actually checking for. You mentioned checking to see if the requested file is a .cfc, but my code for this problem flows from a .cfm to a .js, then to a .cfc, back to a .js and them back to the original .cfm. Is there some way just to check and see if the original .cfm is named "employment-application.cfm" and then, if so, use a condition cfif to stop the cfhtmlhead from being used in the onRequestStart in the application.cfc? (I'm beginning to appreciate the extra work of cfincluding my variables per page, just to avoid this kind of issue when using AJAX!) I don't understand why the variable set in onRequestStart, "js_variables" gets included in the JSON response, anyway. -----Original Message----- From: Raymond Camden [mailto:[email protected]] Sent: Tuesday, May 22, 2012 3:09 PM To: cf-talk Subject: Re: How to prevent cfhtmlhead content from being inserted into cfmail... On Tue, May 22, 2012 at 1:26 PM, Rick Faircloth <[email protected]> wrote: > > Is there any way to prevent the JS being output using cfsavecontent and a > variable > in the CFC from ending up in the JSON data return? Sure. In your onRequestStart, simply check the requested file. If it ends in .cfc, stop doing that. -- =========================================================================== Raymond Camden, Adobe Developer Evangelist Email : [email protected] Blog : www.raymondcamden.com Twitter: cfjedimaster ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:351297 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

