Well, apparently, I can conditionally comment out any of the
CF based on the requesting file. However, the JS isn't affected
by the conditional comments and still shows up in the JSON, causing
the JS to stop processing.  Once I remove the JS, the processing
occurs normally.

Looks like I'm going to have to rewrite a lot of pages and use
cfinclude the js_variables where needed.

Bummer...

PS - I appreciate the tip on "thepage" variable passed onRequestStart.
I didn't find that in the docs, specifically, nor in other Google searches.

Rick

-----Original Message-----
From: Raymond Camden [mailto:[email protected]] 
Sent: Tuesday, May 22, 2012 10:26 PM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


On Tue, May 22, 2012 at 6:14 PM, Rick Faircloth
<[email protected]> wrote:
>
> Ray, can you (or any of your other guys) give me an example
> of how to code to "check the requested file" ???

onRequestStart is passed one attribute, the name of the file being
requested. You can use list functions on it if you want -

<cffunction name="onRequestStart">
  <cfargument name="thepage">

  <cfset var extension = listLast(thepage, ".")>

  <!--- logic here to do stuff if .cfc -->

> I don't understand why the variable set in onRequestStart, "js_variables"
> gets included in the JSON response, anyway.

Because onRequestStart means just that - run it every time you request
a CFC or CFM.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:351300
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to