var js_sitename = '#js_sitename#';
var js_website = '#js_website#';
var js_site_manager_dsn = '#js_site_manager_dsn#';
var js_client_dsn = '#js_client_dsn#';
<cfhtmlhead text = "#jsVariables#" />
If I use:
<cfif listLast(arguments.thepage, '/') is not "employment-application.cfm">
around the code above, it prevents the insertion of code into the head of
employment-application.cfm, but the lines between and including,
JSON produced by an AJAX call from employment-application.cfm.
From: Raymond Camden [mailto:raymondcamden@gmai...]
Sent: Wednesday, May 23, 2012 7:25 AM
Subject: Re: How to prevent cfhtmlhead content from being inserted into
On Tue, May 22, 2012 at 10:50 PM, Rick Faircloth
> 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.
Is your JS in a CFM file? If so, it doesn't matter. CF doesn't care if
you output HTML, JS, or Klingon. If it is a CFM or a CFC _file_, then
onRequestStart will fire.
> PS - I appreciate the tip on "thepage" variable passed onRequestStart.
> I didn't find that in the docs, specifically, nor in other Google
It is there - in the CFML Reference, chapter 8 (well, for CF10) is:
Application CFC Reference