CFHTMLHEAD

2014-10-16 Thread Dave Sueltenfuss

I'm working on a migration from CF9 to CF 11, and for some reason CFHTMLHEAD is 
not working for me. Has anyone else run into this? 

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


Re: CFHTMLHEAD

2014-10-16 Thread Gonzo Rock

Just finished a huge migration to CF11 and there were multiple locations
where cfhtmlhead are used... and a new one added during migration. No
problems with that. Perhaps more details?

On Thu, Oct 16, 2014 at 9:34 AM, Dave Sueltenfuss dsueltenf...@gmail.com
wrote:


 I'm working on a migration from CF9 to CF 11, and for some reason
 CFHTMLHEAD is not working for me. Has anyone else run into this?

 

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


question on cfhtmlhead

2012-08-21 Thread fun and learning

Hi -

I want to exclude one of the page from search engine crawling. I am using the 
following tag

meta name=robots content=noindex,nofollow

Also I am inserting the above tag through cfhtmlhead. My question is if search 
engine would recognize this meta tag that is inserted into head later in the 
page.

I hope I made myself clear.

Thanks. 


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


Re: question on cfhtmlhead

2012-08-21 Thread Justin Scott

 Also I am inserting the above tag through cfhtmlhead. My question is
 if search engine would recognize this meta tag that is inserted into head
 later in the page.

Hi there, the CFHTMLHEAD tag will inject the content into the HEAD
section of the HTML before any of it is flushed out to the client, so
when a search engine sees the content it will show up in the HEAD
section regardless of where in the code you make the call to
CFHTMLHEAD.


-Justin Scott

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


Re: question on cfhtmlhead

2012-08-21 Thread John M Bliss

They will. Before search engine sees your pages, CF processes
the cfhtmlhead and inserts the meta tag into the head of the page. Same as
with an end-user.

On Tue, Aug 21, 2012 at 3:09 PM, fun and learning
funandlrnn...@gmail.comwrote:


 Hi -

 I want to exclude one of the page from search engine crawling. I am using
 the following tag

 meta name=robots content=noindex,nofollow

 Also I am inserting the above tag through cfhtmlhead. My question is if
 search engine would recognize this meta tag that is inserted into head
 later in the page.

 I hope I made myself clear.

 Thanks.


 

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


RE: question on cfhtmlhead

2012-08-21 Thread Robert Harrison

You should also put a disallow for this page in the Robots.txt file. 

Robert Harrison 
Director of Interactive Services

Austin  Williams
Advertising I Branding I Digital I Direct  
125 Kennedy Drive,  Suite 100   I  Hauppauge, NY 11788
T 631.231.6600 X 119   F 631.434.7022   
http://www.austin-williams.com

Blog:  http://www.austin-williams.com/blog
Twitter:  http://www.twitter.com/austin_williams 


-Original Message-
From: fun and learning [mailto:funandlrnn...@gmail.com] 
Sent: Tuesday, August 21, 2012 4:09 PM
To: cf-talk
Subject: question on cfhtmlhead


Hi -

I want to exclude one of the page from search engine crawling. I am using the 
following tag

meta name=robots content=noindex,nofollow

Also I am inserting the above tag through cfhtmlhead. My question is if search 
engine would recognize this meta tag that is inserted into head later in the 
page.

I hope I made myself clear.

Thanks. 




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


Re: question on cfhtmlhead

2012-08-21 Thread fun and learning

They will. Before search engine sees your pages, CF processes
the cfhtmlhead and inserts the meta tag into the head of the page. Same as
with an end-user.

On Tue, Aug 21, 2012 at 3:09 PM, fun and learning
funandlrnn...@gmail.comwrote:



Thanks a lot. all your answers are really helpful 


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


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Raymond Camden

On Tue, May 22, 2012 at 10:50 PM, Rick Faircloth
r...@whitestonemedia.com wrote:
 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 searches.

It is there - in the CFML Reference, chapter 8 (well, for CF10) is:
Application CFC Reference

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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Rick Faircloth

The JS and CF affected by the commenting is in the onRequestStart
function in the application.cfc:

cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---

   cfset  js_sitename = application.sitename  /
   cfset  js_website  = application.website   /
   cfset  js_site_manager_dsn = application.site_manager_dsn  /
   cfset  js_client_dsn   = application.client_dsn/

   cfoutput

  script type=text/javascript

 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#';

  /script

   /cfoutput

/cfsavecontent

cfhtmlhead text = #jsVariables# /


If I use:

cfif listLast(arguments.thepage, '/') is not employment-application.cfm

/cfif

around the code above, it prevents the insertion of code into the head of
employment-application.cfm, but the lines between and including,
script type=text/javascript.../script still get inserted into the
JSON produced by an AJAX call from employment-application.cfm.

 

-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: Wednesday, May 23, 2012 7:25 AM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


On Tue, May 22, 2012 at 10:50 PM, Rick Faircloth
r...@whitestonemedia.com wrote:
 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
searches.

It is there - in the CFML Reference, chapter 8 (well, for CF10) is:
Application CFC Reference



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


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Raymond Camden

You are confusing requests here.

If the file, employment-application.cfm, includes a script tag that
points to a CFM, that's a _second_ request, not the same as the first
one. If it requests something like javascript.cfm, then your
onRequestStart needs to recognize that too.

On Wed, May 23, 2012 at 6:46 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 The JS and CF affected by the commenting is in the onRequestStart
 function in the application.cfc:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---


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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Rick Faircloth

 If the file, employment-application.cfm, includes a script tag that
points to a CFM...

It doesn't.  Here are the files involved:

1) employment-application.cfm
2) application.cfc
2) employment-application-form-processing.js
3) employment-application.cfc

employment-application.cfm has the above js file
included via a script link.

The js file has an AJAX call to a method in
employment-application.cfc for processing the form
contained in the .cfm above.

employment-application.cfc, as well as processing the
form, also sends a couple of cfmail messages, if processing
is successful.

After successful processing of the form and sending of the
cfmail messages in the cfc method, JSON is sent back to the
AJAX call in the js file, which then, as the final step,
should change the processing message the user sees on the
form to a success message.

But because the JSON includes more than just the message
FORMSTATUS:SUCCESS in its content, which is the js script
from the onRequestStart method in the application.cfc, the
js won't complete the last step.

I'm just trying to find a way to prevent the js script
that gets inserted into the head of each page from being
included in the JSON data returned.

I don't need the js variables that are included via the
onRequestStart for the employment-application.cfm page, so
I was trying to find a way to prevent application.cfc from
processing the js variables if the requesting page is
employment-application.cfm.

Your suggestion to use

cfif listLast(thepage, '/') is not employment-application.cfm
/cfif

worked fine, to bypass the CF code processing the application.cfc,
but the js script contained inside the conditional statement
still shows up in the JSON.

Either the conditional statement above won't afffect the inclusion
script/script tag contained in the onRequestStart method or
the AJAX call from the js file to the employment-application.cfc
method also triggers the onRequestStart method and that causes the
JSON to include the js script code.

Perhaps I should try

cfif listLast(thepage, '/') is not employment-application.cfc
/cfif

and see if that works.

I'll give that a try.

Does any of this make sense?

Rick



-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: Wednesday, May 23, 2012 7:52 AM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


You are confusing requests here.

If the file, employment-application.cfm, includes a script tag that
points to a CFM, that's a _second_ request, not the same as the first
one. If it requests something like javascript.cfm, then your
onRequestStart needs to recognize that too.

On Wed, May 23, 2012 at 6:46 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 The JS and CF affected by the commenting is in the onRequestStart
 function in the application.cfc:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---




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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Rick Faircloth

 Perhaps I should try

 cfif listLast(thepage, '/') is not employment-application.cfc
 /cfif

 and see if that works.

That seems to have worked, on the initial test. The JSON response
doesn't include the js script tags and content as it did when I 
used employment-application.cfm, instead of the .cfc above.

I hadn't thought that the employment-application.cfc file would be
considered the requesting file by the onRequestMethod
when the method in employment-application.cfc involved ran. That being
the case, I can understand how the js script gets included in the JSON,
because the onRequestStart cfoutput's the js script in order
to assign value to the CF variables using ##'s inside the js script.

i.e.

cfoutput

   script type=text/javascript

  var js_client_dsn = '#client_dsn#';

   /script

/cfoutput

I don't *think* that I can assign the value to the var without
using cfoutput and the ##'s around the CF variables.

The only thing I know at this point for sure is that I have a working
solution to the form processing for an impatient client.

So, this hack will have to stand for now.

Now to see if this works on the production site. :o)

Rick





-Original Message-
From: Rick Faircloth [mailto:r...@whitestonemedia.com] 
Sent: Wednesday, May 23, 2012 8:55 AM
To: cf-talk
Subject: RE: How to prevent cfhtmlhead content from being inserted into
cfmail...


 If the file, employment-application.cfm, includes a script tag that
points to a CFM...

It doesn't.  Here are the files involved:

1) employment-application.cfm
2) application.cfc
2) employment-application-form-processing.js
3) employment-application.cfc

employment-application.cfm has the above js file
included via a script link.

The js file has an AJAX call to a method in
employment-application.cfc for processing the form
contained in the .cfm above.

employment-application.cfc, as well as processing the
form, also sends a couple of cfmail messages, if processing
is successful.

After successful processing of the form and sending of the
cfmail messages in the cfc method, JSON is sent back to the
AJAX call in the js file, which then, as the final step,
should change the processing message the user sees on the
form to a success message.

But because the JSON includes more than just the message
FORMSTATUS:SUCCESS in its content, which is the js script
from the onRequestStart method in the application.cfc, the
js won't complete the last step.

I'm just trying to find a way to prevent the js script
that gets inserted into the head of each page from being
included in the JSON data returned.

I don't need the js variables that are included via the
onRequestStart for the employment-application.cfm page, so
I was trying to find a way to prevent application.cfc from
processing the js variables if the requesting page is
employment-application.cfm.

Your suggestion to use

cfif listLast(thepage, '/') is not employment-application.cfm
/cfif

worked fine, to bypass the CF code processing the application.cfc,
but the js script contained inside the conditional statement
still shows up in the JSON.

Either the conditional statement above won't afffect the inclusion
script/script tag contained in the onRequestStart method or
the AJAX call from the js file to the employment-application.cfc
method also triggers the onRequestStart method and that causes the
JSON to include the js script code.

Perhaps I should try

cfif listLast(thepage, '/') is not employment-application.cfc
/cfif

and see if that works.

I'll give that a try.

Does any of this make sense?

Rick



-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: Wednesday, May 23, 2012 7:52 AM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


You are confusing requests here.

If the file, employment-application.cfm, includes a script tag that
points to a CFM, that's a _second_ request, not the same as the first
one. If it requests something like javascript.cfm, then your
onRequestStart needs to recognize that too.

On Wed, May 23, 2012 at 6:46 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 The JS and CF affected by the commenting is in the onRequestStart
 function in the application.cfc:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---






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


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-23 Thread Raymond Camden

Woot. Glad you got it.

On Wed, May 23, 2012 at 8:08 AM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Perhaps I should try

 cfif listLast(thepage, '/') is not employment-application.cfc
 /cfif

 and see if that works.

 That seems to have worked, on the initial test. The JSON response
 doesn't include the js script tags and content as it did when I
 used employment-application.cfm, instead of the .cfc above.


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


How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

Hi, all...

I've got a cfhtmlhead tag set up in my application CFC that
defines some JS variables for CF use and vice-versa. They're inserted into
the
head of every page.

I noticed, when running an sequence involving an HTML form - jQuery ajax
call -
CFC method - and JSON data return, that the JS variables are being inserted
into the JSON return data from the ajax call. This is throwing off my
success processing after the call.

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? The CFMAIL is processed
fine
and the mail goes out, but the extra data beyond success in the JSON is
preventing
and further JS statement from processing...basically, the Processing...
message
isn't being hidden and the Thank You message isn't being shown after the
form
is processed and the mail is sent.

I didn't want to get into all the code up front in case there's a simple way
to handle this.

Thanks for any feedback!  If you need to see some code, let me know!

Rick



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


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Raymond Camden

On Tue, May 22, 2012 at 1:26 PM, Rick Faircloth
r...@whitestonemedia.com 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 : raymondcam...@gmail.com
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:351286
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

I figured it would be something straight-forward like that. :o)

Thanks, Ray!

Rick

-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
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
r...@whitestonemedia.com 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 : raymondcam...@gmail.com
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:351288
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Andrew Scott

Rick that might be a good case to think about the application, and one
reason why you need to keep things out of the Application.cfc that really
don't need to be there.

If you must continue with it, then you might need to look for a conditional
statement to not include the JS etc for the CFHTMLHEAD, but on the other
side of your question you can use cfsavecontent to create a variable and
use that with CFHTMLHEAD.

-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543



On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth r...@whitestonemedia.comwrote:


 Hi, all...

 I've got a cfhtmlhead tag set up in my application CFC that
 defines some JS variables for CF use and vice-versa. They're inserted into
 the
 head of every page.

 I noticed, when running an sequence involving an HTML form - jQuery ajax
 call -
 CFC method - and JSON data return, that the JS variables are being inserted
 into the JSON return data from the ajax call. This is throwing off my
 success processing after the call.

 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? The CFMAIL is processed
 fine
 and the mail goes out, but the extra data beyond success in the JSON is
 preventing
 and further JS statement from processing...basically, the Processing...
 message
 isn't being hidden and the Thank You message isn't being shown after the
 form
 is processed and the mail is sent.

 I didn't want to get into all the code up front in case there's a simple
 way
 to handle this.

 Thanks for any feedback!  If you need to see some code, let me know!

 Rick



 

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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

I need variables like these (these are just part of the variables)
on every page of the site, useable as CF and JS variables:

cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---

   cfset  js_sitename = application.sitename  /
   cfset  js_website  = application.website   /
   cfset  js_site_manager_dsn = application.site_manager_dsn  /
   cfset  js_client_dsn   = application.client_dsn/

   cfoutput

  script type=text/javascript

 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#';

  /script

   /cfoutput

/cfsavecontent

cfhtmlhead text = #jsVariables# /


Why would putting this code directly in the head of each page
be better than using cfhtmlhead?



-Original Message-
From: Andrew Scott [mailto:andr...@andyscott.id.au] 
Sent: Tuesday, May 22, 2012 4:19 PM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


Rick that might be a good case to think about the application, and one
reason why you need to keep things out of the Application.cfc that really
don't need to be there.

If you must continue with it, then you might need to look for a conditional
statement to not include the JS etc for the CFHTMLHEAD, but on the other
side of your question you can use cfsavecontent to create a variable and
use that with CFHTMLHEAD.

-- 
Regards,
Andrew Scott
WebSite: http://www.andyscott.id.au/
Google+: http://plus.google.com/108193156965451149543



On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
r...@whitestonemedia.comwrote:


 Hi, all...

 I've got a cfhtmlhead tag set up in my application CFC that
 defines some JS variables for CF use and vice-versa. They're inserted into
 the
 head of every page.

 I noticed, when running an sequence involving an HTML form - jQuery ajax
 call -
 CFC method - and JSON data return, that the JS variables are being
inserted
 into the JSON return data from the ajax call. This is throwing off my
 success processing after the call.

 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? The CFMAIL is processed
 fine
 and the mail goes out, but the extra data beyond success in the JSON is
 preventing
 and further JS statement from processing...basically, the Processing...
 message
 isn't being hidden and the Thank You message isn't being shown after the
 form
 is processed and the mail is sent.

 I didn't want to get into all the code up front in case there's a simple
 way
 to handle this.

 Thanks for any feedback!  If you need to see some code, let me know!

 Rick



 



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


Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Matt Quackenbush

It would be much better to use an include for your HTML head (in your
layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
reason to set all of those 'js_whatever' variables. Just output
#application.whatever# in the js. Your include file might look something
like so:

head
!-- all of your standard css/js links, scripts, etc., including the js
you've just shown --
titlebla bla/title
/head

So each page (or layout) simply does a cfinclude
tempate=/includes/html_head.cfm /.

HTH

On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth r...@whitestonemedia.comwrote:


 I need variables like these (these are just part of the variables)
 on every page of the site, useable as CF and JS variables:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---

   cfset  js_sitename = application.sitename  /
   cfset  js_website  = application.website   /
   cfset  js_site_manager_dsn = application.site_manager_dsn  /
   cfset  js_client_dsn   = application.client_dsn/

   cfoutput

  script type=text/javascript

 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#';

  /script

   /cfoutput

 /cfsavecontent

 cfhtmlhead text = #jsVariables# /


 Why would putting this code directly in the head of each page
 be better than using cfhtmlhead?



 -Original Message-
 From: Andrew Scott [mailto:andr...@andyscott.id.au]
 Sent: Tuesday, May 22, 2012 4:19 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 Rick that might be a good case to think about the application, and one
 reason why you need to keep things out of the Application.cfc that really
 don't need to be there.

 If you must continue with it, then you might need to look for a conditional
 statement to not include the JS etc for the CFHTMLHEAD, but on the other
 side of your question you can use cfsavecontent to create a variable and
 use that with CFHTMLHEAD.

 --
 Regards,
 Andrew Scott
 WebSite: http://www.andyscott.id.au/
 Google+: http://plus.google.com/108193156965451149543



 On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  Hi, all...
 
  I've got a cfhtmlhead tag set up in my application CFC that
  defines some JS variables for CF use and vice-versa. They're inserted
 into
  the
  head of every page.
 
  I noticed, when running an sequence involving an HTML form - jQuery ajax
  call -
  CFC method - and JSON data return, that the JS variables are being
 inserted
  into the JSON return data from the ajax call. This is throwing off my
  success processing after the call.
 
  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? The CFMAIL is
 processed
  fine
  and the mail goes out, but the extra data beyond success in the JSON is
  preventing
  and further JS statement from processing...basically, the Processing...
  message
  isn't being hidden and the Thank You message isn't being shown after
 the
  form
  is processed and the mail is sent.
 
  I didn't want to get into all the code up front in case there's a simple
  way
  to handle this.
 
  Thanks for any feedback!  If you need to see some code, let me know!
 
  Rick
 
 
 
 



 

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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

 Just output #application.whatever# in the js.

Seems like when I first started trying to use CF variables in
JS, I couldn't. I'll have to revisit this approach.

 So each page (or layout) simply does a cfinclude
  tempate=/includes/html_head.cfm /.

But with this approach, I still have to type that line on every
page in the app.  With onRequestStart, I only have to type it once.
Is the reason *not* to set the variables in onRequestStart so that
they won't interfere with just such situations as mine? Or are there
other reasons where it causes problems?


-Original Message-
From: Matt Quackenbush [mailto:quackfu...@gmail.com] 
Sent: Tuesday, May 22, 2012 6:37 PM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


It would be much better to use an include for your HTML head (in your
layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
reason to set all of those 'js_whatever' variables. Just output
#application.whatever# in the js. Your include file might look something
like so:

head
!-- all of your standard css/js links, scripts, etc., including the js
you've just shown --
titlebla bla/title
/head

So each page (or layout) simply does a cfinclude
tempate=/includes/html_head.cfm /.

HTH

On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth
r...@whitestonemedia.comwrote:


 I need variables like these (these are just part of the variables)
 on every page of the site, useable as CF and JS variables:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---

   cfset  js_sitename = application.sitename  /
   cfset  js_website  = application.website   /
   cfset  js_site_manager_dsn = application.site_manager_dsn  /
   cfset  js_client_dsn   = application.client_dsn/

   cfoutput

  script type=text/javascript

 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#';

  /script

   /cfoutput

 /cfsavecontent

 cfhtmlhead text = #jsVariables# /


 Why would putting this code directly in the head of each page
 be better than using cfhtmlhead?



 -Original Message-
 From: Andrew Scott [mailto:andr...@andyscott.id.au]
 Sent: Tuesday, May 22, 2012 4:19 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 Rick that might be a good case to think about the application, and one
 reason why you need to keep things out of the Application.cfc that really
 don't need to be there.

 If you must continue with it, then you might need to look for a
conditional
 statement to not include the JS etc for the CFHTMLHEAD, but on the other
 side of your question you can use cfsavecontent to create a variable and
 use that with CFHTMLHEAD.

 --
 Regards,
 Andrew Scott
 WebSite: http://www.andyscott.id.au/
 Google+: http://plus.google.com/108193156965451149543



 On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  Hi, all...
 
  I've got a cfhtmlhead tag set up in my application CFC that
  defines some JS variables for CF use and vice-versa. They're inserted
 into
  the
  head of every page.
 
  I noticed, when running an sequence involving an HTML form - jQuery ajax
  call -
  CFC method - and JSON data return, that the JS variables are being
 inserted
  into the JSON return data from the ajax call. This is throwing off my
  success processing after the call.
 
  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? The CFMAIL is
 processed
  fine
  and the mail goes out, but the extra data beyond success in the JSON
is
  preventing
  and further JS statement from processing...basically, the
Processing...
  message
  isn't being hidden and the Thank You message isn't being shown after
 the
  form
  is processed and the mail is sent.
 
  I didn't want to get into all the code up front in case there's a simple
  way
  to handle this.
 
  Thanks for any feedback!  If you need to see some code, let me know!
 
  Rick
 
 
 
 



 



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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

One problem I can see with this approach is created because of the way I
set up my files.  A page and its accompanying individual js and css files
(no, I don't create a single monster js or css file, but rather many
smaller ones inside module folders that contain the .cfm, .cfc, .css,
and .js specific to a particular module.  There are *many* more files that
way, but I don't find the increased number of http requests to be a problem.
I do it this way to help me keep my sanity when trying to manage so much
code.

And for a more down-to-earth question... what if the title of a page
was different for every page?  Even if everything else was the same for
each page (all links, etc.), how would you use a variable to create
different titles for all the pages?

Maybe I'm just having a brain cramp and can't see the forest for the
trees...



-Original Message-
From: Matt Quackenbush [mailto:quackfu...@gmail.com] 
Sent: Tuesday, May 22, 2012 6:37 PM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


It would be much better to use an include for your HTML head (in your
layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
reason to set all of those 'js_whatever' variables. Just output
#application.whatever# in the js. Your include file might look something
like so:

head
!-- all of your standard css/js links, scripts, etc., including the js
you've just shown --
titlebla bla/title
/head

So each page (or layout) simply does a cfinclude
tempate=/includes/html_head.cfm /.

HTH

On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth
r...@whitestonemedia.comwrote:


 I need variables like these (these are just part of the variables)
 on every page of the site, useable as CF and JS variables:

 cfsavecontent variable = jsVariables

   !--- [ js version of cf variables ] ---

   cfset  js_sitename = application.sitename  /
   cfset  js_website  = application.website   /
   cfset  js_site_manager_dsn = application.site_manager_dsn  /
   cfset  js_client_dsn   = application.client_dsn/

   cfoutput

  script type=text/javascript

 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#';

  /script

   /cfoutput

 /cfsavecontent

 cfhtmlhead text = #jsVariables# /


 Why would putting this code directly in the head of each page
 be better than using cfhtmlhead?



 -Original Message-
 From: Andrew Scott [mailto:andr...@andyscott.id.au]
 Sent: Tuesday, May 22, 2012 4:19 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 Rick that might be a good case to think about the application, and one
 reason why you need to keep things out of the Application.cfc that really
 don't need to be there.

 If you must continue with it, then you might need to look for a
conditional
 statement to not include the JS etc for the CFHTMLHEAD, but on the other
 side of your question you can use cfsavecontent to create a variable and
 use that with CFHTMLHEAD.

 --
 Regards,
 Andrew Scott
 WebSite: http://www.andyscott.id.au/
 Google+: http://plus.google.com/108193156965451149543



 On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  Hi, all...
 
  I've got a cfhtmlhead tag set up in my application CFC that
  defines some JS variables for CF use and vice-versa. They're inserted
 into
  the
  head of every page.
 
  I noticed, when running an sequence involving an HTML form - jQuery ajax
  call -
  CFC method - and JSON data return, that the JS variables are being
 inserted
  into the JSON return data from the ajax call. This is throwing off my
  success processing after the call.
 
  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? The CFMAIL is
 processed
  fine
  and the mail goes out, but the extra data beyond success in the JSON
is
  preventing
  and further JS statement from processing...basically, the
Processing...
  message
  isn't being hidden and the Thank You message isn't being shown after
 the
  form
  is processed and the mail is sent.
 
  I didn't want to get into all the code up front in case there's a simple
  way
  to handle this.
 
  Thanks for any feedback!  If you need to see some code, let me know!
 
  Rick
 
 
 
 



 



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

Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Matt Quackenbush

If you used a front controller, you'd only have to type it once (per
layout/theme). :-)

Setting variables in onRequestStart() is perfectly fine and dandy. It's
often a problem when you use onRequestStart() to *render output*, though.
(Yes, technically speaking, cfhttphead doesn't render output directly, but
for all intents and purposes, it does.)


On Tue, May 22, 2012 at 5:42 PM, Rick Faircloth r...@whitestonemedia.comwrote:


  Just output #application.whatever# in the js.

 Seems like when I first started trying to use CF variables in
 JS, I couldn't. I'll have to revisit this approach.

  So each page (or layout) simply does a cfinclude
  tempate=/includes/html_head.cfm /.

 But with this approach, I still have to type that line on every
 page in the app.  With onRequestStart, I only have to type it once.
 Is the reason *not* to set the variables in onRequestStart so that
 they won't interfere with just such situations as mine? Or are there
 other reasons where it causes problems?


 -Original Message-
 From: Matt Quackenbush [mailto:quackfu...@gmail.com]
 Sent: Tuesday, May 22, 2012 6:37 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 It would be much better to use an include for your HTML head (in your
 layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
 reason to set all of those 'js_whatever' variables. Just output
 #application.whatever# in the js. Your include file might look something
 like so:

 head
!-- all of your standard css/js links, scripts, etc., including the js
 you've just shown --
titlebla bla/title
 /head

 So each page (or layout) simply does a cfinclude
 tempate=/includes/html_head.cfm /.

 HTH

 On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  I need variables like these (these are just part of the variables)
  on every page of the site, useable as CF and JS variables:
 
  cfsavecontent variable = jsVariables
 
!--- [ js version of cf variables ] ---
 
cfset  js_sitename = application.sitename  /
cfset  js_website  = application.website   /
cfset  js_site_manager_dsn = application.site_manager_dsn  /
cfset  js_client_dsn   = application.client_dsn/
 
cfoutput
 
   script type=text/javascript
 
  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#';
 
   /script
 
/cfoutput
 
  /cfsavecontent
 
  cfhtmlhead text = #jsVariables# /
 
 
  Why would putting this code directly in the head of each page
  be better than using cfhtmlhead?
 
 
 
  -Original Message-
  From: Andrew Scott [mailto:andr...@andyscott.id.au]
  Sent: Tuesday, May 22, 2012 4:19 PM
  To: cf-talk
  Subject: Re: How to prevent cfhtmlhead content from being inserted into
  cfmail...
 
 
  Rick that might be a good case to think about the application, and one
  reason why you need to keep things out of the Application.cfc that really
  don't need to be there.
 
  If you must continue with it, then you might need to look for a
 conditional
  statement to not include the JS etc for the CFHTMLHEAD, but on the other
  side of your question you can use cfsavecontent to create a variable and
  use that with CFHTMLHEAD.
 
  --
  Regards,
  Andrew Scott
  WebSite: http://www.andyscott.id.au/
  Google+: http://plus.google.com/108193156965451149543
 
 
 
  On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
  r...@whitestonemedia.comwrote:
 
  
   Hi, all...
  
   I've got a cfhtmlhead tag set up in my application CFC that
   defines some JS variables for CF use and vice-versa. They're inserted
  into
   the
   head of every page.
  
   I noticed, when running an sequence involving an HTML form - jQuery
 ajax
   call -
   CFC method - and JSON data return, that the JS variables are being
  inserted
   into the JSON return data from the ajax call. This is throwing off my
   success processing after the call.
  
   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? The CFMAIL is
  processed
   fine
   and the mail goes out, but the extra data beyond success in the JSON
 is
   preventing
   and further JS statement from processing...basically, the
 Processing...
   message
   isn't being hidden and the Thank You message isn't being shown after
  the
   form
   is processed and the mail is sent.
  
   I didn't want to get into all the code up front in case there's a
 simple
   way
   to handle this.
  
   Thanks for any feedback!  If you need to see some code, let me know!
  
   Rick
  
  
  
  
 
 
 
 



 

~|
Order the Adobe Coldfusion Anthology

Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Matt Quackenbush

There are lots of ways to create a title variable. It really depends upon
how you have your application architecture setup. :-)

title#myBadAssPageTitle#/title


On Tue, May 22, 2012 at 5:52 PM, Rick Faircloth r...@whitestonemedia.comwrote:


 One problem I can see with this approach is created because of the way I
 set up my files.  A page and its accompanying individual js and css files
 (no, I don't create a single monster js or css file, but rather many
 smaller ones inside module folders that contain the .cfm, .cfc, .css,
 and .js specific to a particular module.  There are *many* more files that
 way, but I don't find the increased number of http requests to be a
 problem.
 I do it this way to help me keep my sanity when trying to manage so much
 code.

 And for a more down-to-earth question... what if the title of a page
 was different for every page?  Even if everything else was the same for
 each page (all links, etc.), how would you use a variable to create
 different titles for all the pages?

 Maybe I'm just having a brain cramp and can't see the forest for the
 trees...



 -Original Message-
 From: Matt Quackenbush [mailto:quackfu...@gmail.com]
 Sent: Tuesday, May 22, 2012 6:37 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 It would be much better to use an include for your HTML head (in your
 layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
 reason to set all of those 'js_whatever' variables. Just output
 #application.whatever# in the js. Your include file might look something
 like so:

 head
!-- all of your standard css/js links, scripts, etc., including the js
 you've just shown --
titlebla bla/title
 /head

 So each page (or layout) simply does a cfinclude
 tempate=/includes/html_head.cfm /.

 HTH

 On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  I need variables like these (these are just part of the variables)
  on every page of the site, useable as CF and JS variables:
 
  cfsavecontent variable = jsVariables
 
!--- [ js version of cf variables ] ---
 
cfset  js_sitename = application.sitename  /
cfset  js_website  = application.website   /
cfset  js_site_manager_dsn = application.site_manager_dsn  /
cfset  js_client_dsn   = application.client_dsn/
 
cfoutput
 
   script type=text/javascript
 
  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#';
 
   /script
 
/cfoutput
 
  /cfsavecontent
 
  cfhtmlhead text = #jsVariables# /
 
 
  Why would putting this code directly in the head of each page
  be better than using cfhtmlhead?
 
 
 
  -Original Message-
  From: Andrew Scott [mailto:andr...@andyscott.id.au]
  Sent: Tuesday, May 22, 2012 4:19 PM
  To: cf-talk
  Subject: Re: How to prevent cfhtmlhead content from being inserted into
  cfmail...
 
 
  Rick that might be a good case to think about the application, and one
  reason why you need to keep things out of the Application.cfc that really
  don't need to be there.
 
  If you must continue with it, then you might need to look for a
 conditional
  statement to not include the JS etc for the CFHTMLHEAD, but on the other
  side of your question you can use cfsavecontent to create a variable and
  use that with CFHTMLHEAD.
 
  --
  Regards,
  Andrew Scott
  WebSite: http://www.andyscott.id.au/
  Google+: http://plus.google.com/108193156965451149543
 
 
 
  On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
  r...@whitestonemedia.comwrote:
 
  
   Hi, all...
  
   I've got a cfhtmlhead tag set up in my application CFC that
   defines some JS variables for CF use and vice-versa. They're inserted
  into
   the
   head of every page.
  
   I noticed, when running an sequence involving an HTML form - jQuery
 ajax
   call -
   CFC method - and JSON data return, that the JS variables are being
  inserted
   into the JSON return data from the ajax call. This is throwing off my
   success processing after the call.
  
   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? The CFMAIL is
  processed
   fine
   and the mail goes out, but the extra data beyond success in the JSON
 is
   preventing
   and further JS statement from processing...basically, the
 Processing...
   message
   isn't being hidden and the Thank You message isn't being shown after
  the
   form
   is processed and the mail is sent.
  
   I didn't want to get into all the code up front in case there's a
 simple
   way
   to handle this.
  
   Thanks for any feedback!  If you need to see some code, let me know!
  
   Rick

RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

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:raymondcam...@gmail.com] 
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
r...@whitestonemedia.com 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 : raymondcam...@gmail.com
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


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Rick Faircloth

If every page has a different title, then there has to be a title variable
set for each page *somewhere*...

I've never used an include for the entire head portion of a page, so,
it really depends upon how have your application architecture setup is
lost on me, since I'm not familiar with the options you're referring to.


-Original Message-
From: Matt Quackenbush [mailto:quackfu...@gmail.com] 
Sent: Tuesday, May 22, 2012 6:56 PM
To: cf-talk
Subject: Re: How to prevent cfhtmlhead content from being inserted into
cfmail...


There are lots of ways to create a title variable. It really depends upon
how you have your application architecture setup. :-)

title#myBadAssPageTitle#/title


On Tue, May 22, 2012 at 5:52 PM, Rick Faircloth
r...@whitestonemedia.comwrote:


 One problem I can see with this approach is created because of the way I
 set up my files.  A page and its accompanying individual js and css files
 (no, I don't create a single monster js or css file, but rather many
 smaller ones inside module folders that contain the .cfm, .cfc, .css,
 and .js specific to a particular module.  There are *many* more files that
 way, but I don't find the increased number of http requests to be a
 problem.
 I do it this way to help me keep my sanity when trying to manage so much
 code.

 And for a more down-to-earth question... what if the title of a page
 was different for every page?  Even if everything else was the same for
 each page (all links, etc.), how would you use a variable to create
 different titles for all the pages?

 Maybe I'm just having a brain cramp and can't see the forest for the
 trees...



 -Original Message-
 From: Matt Quackenbush [mailto:quackfu...@gmail.com]
 Sent: Tuesday, May 22, 2012 6:37 PM
 To: cf-talk
 Subject: Re: How to prevent cfhtmlhead content from being inserted into
 cfmail...


 It would be much better to use an include for your HTML head (in your
 layout template) than to use cfhtmlhead in the app CFC.  Also, there is no
 reason to set all of those 'js_whatever' variables. Just output
 #application.whatever# in the js. Your include file might look something
 like so:

 head
!-- all of your standard css/js links, scripts, etc., including the js
 you've just shown --
titlebla bla/title
 /head

 So each page (or layout) simply does a cfinclude
 tempate=/includes/html_head.cfm /.

 HTH

 On Tue, May 22, 2012 at 5:28 PM, Rick Faircloth
 r...@whitestonemedia.comwrote:

 
  I need variables like these (these are just part of the variables)
  on every page of the site, useable as CF and JS variables:
 
  cfsavecontent variable = jsVariables
 
!--- [ js version of cf variables ] ---
 
cfset  js_sitename = application.sitename  /
cfset  js_website  = application.website   /
cfset  js_site_manager_dsn = application.site_manager_dsn  /
cfset  js_client_dsn   = application.client_dsn/
 
cfoutput
 
   script type=text/javascript
 
  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#';
 
   /script
 
/cfoutput
 
  /cfsavecontent
 
  cfhtmlhead text = #jsVariables# /
 
 
  Why would putting this code directly in the head of each page
  be better than using cfhtmlhead?
 
 
 
  -Original Message-
  From: Andrew Scott [mailto:andr...@andyscott.id.au]
  Sent: Tuesday, May 22, 2012 4:19 PM
  To: cf-talk
  Subject: Re: How to prevent cfhtmlhead content from being inserted into
  cfmail...
 
 
  Rick that might be a good case to think about the application, and one
  reason why you need to keep things out of the Application.cfc that
really
  don't need to be there.
 
  If you must continue with it, then you might need to look for a
 conditional
  statement to not include the JS etc for the CFHTMLHEAD, but on the other
  side of your question you can use cfsavecontent to create a variable and
  use that with CFHTMLHEAD.
 
  --
  Regards,
  Andrew Scott
  WebSite: http://www.andyscott.id.au/
  Google+: http://plus.google.com/108193156965451149543
 
 
 
  On Wed, May 23, 2012 at 4:26 AM, Rick Faircloth
  r...@whitestonemedia.comwrote:
 
  
   Hi, all...
  
   I've got a cfhtmlhead tag set up in my application CFC that
   defines some JS variables for CF use and vice-versa. They're inserted
  into
   the
   head of every page.
  
   I noticed, when running an sequence involving an HTML form - jQuery
 ajax
   call -
   CFC method - and JSON data return, that the JS variables are being
  inserted
   into the JSON return data from the ajax call. This is throwing off my
   success processing after the call.
  
   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? The CFMAIL is
  processed

Re: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread Raymond Camden

On Tue, May 22, 2012 at 6:14 PM, Rick Faircloth
r...@whitestonemedia.com 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:351299
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: How to prevent cfhtmlhead content from being inserted into cfmail...

2012-05-22 Thread 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.

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:raymondcam...@gmail.com] 
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
r...@whitestonemedia.com 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


Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Rick Faircloth

Ok... something to talk about besides $20/hr (which may look
really good, depending on how hungry you are...)

I recently started using cfhtmlhead in onApplicationStart to put
the following CF/JS in the head of each page to translate my CF
site variables to JS:

cfset  js_sitename   =   application.sitename/
cfset  js_website=   application.website /
cfset  js_site_manager_dsn   =   application.site_manager_dsn/
cfset  js_client_dsn =   application.client_dsn  /

cfoutput

script

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#';

/script

/cfoutput

However, I just coded a page to load its content via jQuery AJAX
which accesses a CFC method which uses cfSaveContent to generate
the page.s HTML and then saves that to a document, which is then loaded
via jQuery AJAX.

After cfSaveContent does its thing, I send a 'Success' message
in JSON back to the AJAX call.  But this wasn't working.  I've written
this routine hundreds of times, so I know nothing was wrong with the
AJAX code.

It turns out that the JS above in between the two cfoutput's was
being sent back in the JSON, which was causing the message being sent
back to the AJAX call to not just be 'Success', which would trigger
the page HTML loading.

Why would the above JS show up in the JSON data and what can I do about
it?  Taking the cfhtmlhead functionality out of the application.cfc's
onApplicationStart routine and putting it manually in the head of the
document solved the problem, but I enjoyed being able to insert the
variable routine into the head of each page automatically.

Thoughts?  Suggestions?

For $20 an hour? :o)

Rick



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


Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Russ Michaels

it is only happening onApplicationstart or is it being inserted into
every request ?

Russ

On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)

 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:

 cfset  js_sitename           =   application.sitename            /
 cfset  js_website            =   application.website             /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn    /
 cfset  js_client_dsn         =   application.client_dsn          /

 cfoutput

    script

        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#';

    /script

 /cfoutput

 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.

 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.

 It turns out that the JS above in between the two cfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.

 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.

 Thoughts?  Suggestions?

 For $20 an hour? :o)

 Rick



 

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


RE: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Rick Faircloth

Only onApplicationStart currently.

I thought about using onRequestStart, but it needs to
always be on the page, anyway, so I thought I'd do it once
in the onApplicationStart routine.

Is that a problem?

Oh, wait... do you mean every page request or every
AJAX request for data?


-Original Message-
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: Saturday, September 24, 2011 8:00 AM
To: cf-talk
Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data


it is only happening onApplicationstart or is it being inserted into
every request ?

Russ

On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)

 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:

 cfset  js_sitename           =   application.sitename            /
 cfset  js_website            =   application.website             /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn    /
 cfset  js_client_dsn         =   application.client_dsn          /

 cfoutput

    script

        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#';

    /script

 /cfoutput

 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.

 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.

 It turns out that the JS above in between the two cfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.

 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.

 Thoughts?  Suggestions?

 For $20 an hour? :o)

 Rick



 



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


Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Russ Michaels

well using your current method the vars will of course will only be
created and output once when application starts, so wont exist on any
subsequent requests, which I do not think is what you want if they are
JS variables you want them output on every page request in order for
them to be available to JS, so you would need to do it onrequestStart
or just by putting them in the actual html head.

Technically if there is no HEAD section then CF should not be trying
to insert the content, so in your CFC's you need to make sure you have
output disabled so that unnecessary content doesn't get added. You may
also need to make use of cfsetting enablecfoutputonly=true is some
places as well.

Russ

On Sat, Sep 24, 2011 at 1:06 PM, Rick Faircloth
r...@whitestonemedia.com wrote:

 Only onApplicationStart currently.

 I thought about using onRequestStart, but it needs to
 always be on the page, anyway, so I thought I'd do it once
 in the onApplicationStart routine.

 Is that a problem?

 Oh, wait... do you mean every page request or every
 AJAX request for data?


 -Original Message-
 From: Russ Michaels [mailto:r...@michaels.me.uk]
 Sent: Saturday, September 24, 2011 8:00 AM
 To: cf-talk
 Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data


 it is only happening onApplicationstart or is it being inserted into
 every request ?

 Russ

 On Sat, Sep 24, 2011 at 12:31 PM, Rick Faircloth
 r...@whitestonemedia.com wrote:

 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)

 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:

 cfset  js_sitename           =   application.sitename            /
 cfset  js_website            =   application.website             /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn    /
 cfset  js_client_dsn         =   application.client_dsn          /

 cfoutput

    script

        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#';

    /script

 /cfoutput

 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.

 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.

 It turns out that the JS above in between the two cfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.

 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.

 Thoughts?  Suggestions?

 For $20 an hour? :o)

 Rick







 

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


Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Steve 'Cutter' Blades

You wouldn't put it in onApplicationStart, but onRequest (cf9+). 
onRequest is only triggered on cfm requests, whereas a cfc would trigger 
onCFCRequest. (I am assuming your Ajax requests are going to a CFC)

Set up your js vars in onApplicationStart

cfscript
  application.siteDetail = {js_sitename=application.sitename,
   js_website=application.website,
   js_site_manager_dsn=application.site_manager_dsn,
   js_client_dsn=application.client_dsn }
/cfscript

Then, in your onRequest (though some header include custom tag, included 
at the page level, would be better and give greater flexibility)

cfoutputscript type=text/javascriptvar siteDetail = 
#SerializeJSON(application.siteDetail)#;/script/cfoutput

Then, in your JS, access the vars from the JS obj

... // some JQuery Ajax call data object
 data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'})

There's probably many ways to handle all of this, but putting the output 
in your onApplication or onSession methods is not the way to go.

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-style-user-interfaces/book

The best way to predict the future is to help create it


On 9/24/2011 7:31 AM, Rick Faircloth wrote:
 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)

 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:

 cfset  js_sitename   =   application.sitename/
 cfset  js_website=   application.website /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn/
 cfset  js_client_dsn =   application.client_dsn  /

 cfoutput

  script

  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#';

  /script

 /cfoutput

 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.

 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.

 It turns out that the JS above in between the twocfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.

 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.

 Thoughts?  Suggestions?

 For $20 an hour? :o)

 Rick



 

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


RE: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Rick Faircloth

Duh... Steve, what you and Russ have pointed out makes perfect sense.
My initial thought was to use onRequestStart, but for some reason
decided to use onApplicationStart, which wouldn't work for every page.

I guess I was thinking of just creating the variables once for
global use, rather than focusing on the fact that I needed to create
them for every page.

Thanks for the tip! (...and the code, Steve! :o)

And yes, it's CF9...

Rick

-Original Message-
From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] 
Sent: Saturday, September 24, 2011 8:41 AM
To: cf-talk
Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data


You wouldn't put it in onApplicationStart, but onRequest (cf9+). 
onRequest is only triggered on cfm requests, whereas a cfc would trigger 
onCFCRequest. (I am assuming your Ajax requests are going to a CFC)

Set up your js vars in onApplicationStart

cfscript
  application.siteDetail = {js_sitename=application.sitename,
   js_website=application.website,
   js_site_manager_dsn=application.site_manager_dsn,
   js_client_dsn=application.client_dsn }
/cfscript

Then, in your onRequest (though some header include custom tag, included 
at the page level, would be better and give greater flexibility)

cfoutputscript type=text/javascriptvar siteDetail = 
#SerializeJSON(application.siteDetail)#;/script/cfoutput

Then, in your JS, access the vars from the JS obj

... // some JQuery Ajax call data object
 data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'})

There's probably many ways to handle all of this, but putting the output 
in your onApplication or onSession methods is not the way to go.

Steve 'Cutter' Blades
Adobe Community Professional
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer

http://cutterscrossing.com


Co-Author Learning Ext JS 3.2 Packt Publishing 2010
https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-st
yle-user-interfaces/book

The best way to predict the future is to help create it


On 9/24/2011 7:31 AM, Rick Faircloth wrote:
 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)

 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:

 cfset  js_sitename   =   application.sitename/
 cfset  js_website=   application.website /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn/
 cfset  js_client_dsn =   application.client_dsn  /

 cfoutput

  script

  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#';

  /script

 /cfoutput

 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.

 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.

 It turns out that the JS above in between the twocfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.

 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.

 Thoughts?  Suggestions?

 For $20 an hour? :o)

 Rick



 



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


Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data

2011-09-24 Thread Lists

Good job Steve!!

On Sep 24, 2011, at 8:18 AM, Rick Faircloth r...@whitestonemedia.com wrote:

 
 Duh... Steve, what you and Russ have pointed out makes perfect sense.
 My initial thought was to use onRequestStart, but for some reason
 decided to use onApplicationStart, which wouldn't work for every page.
 
 I guess I was thinking of just creating the variables once for
 global use, rather than focusing on the fact that I needed to create
 them for every page.
 
 Thanks for the tip! (...and the code, Steve! :o)
 
 And yes, it's CF9...
 
 Rick
 
 -Original Message-
 From: Steve 'Cutter' Blades [mailto:cold.fus...@cutterscrossing.com] 
 Sent: Saturday, September 24, 2011 8:41 AM
 To: cf-talk
 Subject: Re: Code from cfhtmlhead showing up in jQuery AJAX JSON data
 
 
 You wouldn't put it in onApplicationStart, but onRequest (cf9+). 
 onRequest is only triggered on cfm requests, whereas a cfc would trigger 
 onCFCRequest. (I am assuming your Ajax requests are going to a CFC)
 
 Set up your js vars in onApplicationStart
 
 cfscript
  application.siteDetail = {js_sitename=application.sitename,
   js_website=application.website,
   js_site_manager_dsn=application.site_manager_dsn,
   js_client_dsn=application.client_dsn }
 /cfscript
 
 Then, in your onRequest (though some header include custom tag, included 
 at the page level, would be better and give greater flexibility)
 
 cfoutputscript type=text/javascriptvar siteDetail = 
 #SerializeJSON(application.siteDetail)#;/script/cfoutput
 
 Then, in your JS, access the vars from the JS obj
 
 ... // some JQuery Ajax call data object
 data: $.extend(true,{},siteDetail,{someArg:1,someArg2:'myArg'})
 
 There's probably many ways to handle all of this, but putting the output 
 in your onApplication or onSession methods is not the way to go.
 
 Steve 'Cutter' Blades
 Adobe Community Professional
 Adobe Certified Expert
 Advanced Macromedia ColdFusion MX 7 Developer
 
 http://cutterscrossing.com
 
 
 Co-Author Learning Ext JS 3.2 Packt Publishing 2010
 https://www.packtpub.com/learning-ext-js-3-2-for-building-dynamic-desktop-st
 yle-user-interfaces/book
 
 The best way to predict the future is to help create it
 
 
 On 9/24/2011 7:31 AM, Rick Faircloth wrote:
 Ok... something to talk about besides $20/hr (which may look
 really good, depending on how hungry you are...)
 
 I recently started using cfhtmlhead in onApplicationStart to put
 the following CF/JS in the head of each page to translate my CF
 site variables to JS:
 
 cfset  js_sitename   =   application.sitename/
 cfset  js_website=   application.website /
 cfset  js_site_manager_dsn   =   application.site_manager_dsn/
 cfset  js_client_dsn =   application.client_dsn  /
 
 cfoutput
 
 script
 
 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#';
 
 /script
 
 /cfoutput
 
 However, I just coded a page to load its content via jQuery AJAX
 which accesses a CFC method which uses cfSaveContent to generate
 the page.s HTML and then saves that to a document, which is then loaded
 via jQuery AJAX.
 
 After cfSaveContent does its thing, I send a 'Success' message
 in JSON back to the AJAX call.  But this wasn't working.  I've written
 this routine hundreds of times, so I know nothing was wrong with the
 AJAX code.
 
 It turns out that the JS above in between the twocfoutput's was
 being sent back in the JSON, which was causing the message being sent
 back to the AJAX call to not just be 'Success', which would trigger
 the page HTML loading.
 
 Why would the above JS show up in the JSON data and what can I do about
 it?  Taking the cfhtmlhead functionality out of the application.cfc's
 onApplicationStart routine and putting it manually in the head of the
 document solved the problem, but I enjoyed being able to insert the
 variable routine into the head of each page automatically.
 
 Thoughts?  Suggestions?
 
 For $20 an hour? :o)
 
 Rick
 
 
 
 
 
 
 
 

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


cfhtmlhead and webservice woe

2006-07-26 Thread Brad Wood
Ok, so I've got ajaxcfc running pretty smoothly, but I still need some
help with my major catching point-cfhtmlhead.

 

As part of my CFC, I cfsavecontent a page from our application and
return the html to stick in an the innerHTML of a div on the ajax page.
Our application uses cfhtmlhead a lot to stick javascript in the head of
the document for various reasons.  The problem is that CF appends the
htmlhead information to the top of the return value that my CFC sends
back to the browser and that really screws stuff up.  Ajaxcfc sees this
coming back from the webservice:

 

 

script language=JavaScript1.2 type=text/javascript

!--

This comes from the cfhtmlhead tag and totally screws up
ajaxcfc

--

/script

 

_4304_1153931164505 = 'This is my content being returned';

DWREngine._handleResponse('4304_1153931164505', _4304_1153931164505);

 

So the obvious answer here is probably Don't use cfhtmlhead you idiot,
but I'm trying to NOT have to write as much as my application as
possible-I want a scalable fix that will still let me include or
cfmodule any page in my app and simply return the resulting HTML from
the CFC.  I can find every instance of cfhtmlhead and put an if
statement around it or something, that that sounds like a kludgy fix.  



Is there a pretty way to handle this?

 

~Brad





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247766
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfhtmlhead and webservice woe

2006-07-26 Thread Rick Root
Brad Wood wrote:
 Ok, so I've got ajaxcfc running pretty smoothly, but I still need some
 help with my major catching point-cfhtmlhead.

Don't use CFHTMLHEAD in your application.cfm or whatever then.  Or, if 
you do, wrap code around it that causes it *NOT* to happen on ajax calls.

cfif refindnocase(\.cfc,CGI.SCRIPT_NAME) is 0
cfhtmlhead ...
/cfif

Maybe that'd help.

Rick

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247792
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: cfhtmlhead and webservice woe

2006-07-26 Thread Ken Ferguson
That's funny, in CFAjax this doesn't cause a problem at all. I was just 
blogging about using firebug and noticed how it comes back differently 
in the response, so that preceding script blocks don't break the return.

http://www.fergusonhouse.com/blog/index.cfm/2006/7/26/firebug-cfajax

One of the other guys here at the office was having trouble trying to 
use AjaxCFC and when we looked at the response in firebug, you could see 
the differences in the response that was messing things up. Try looking 
at your posts and responses in firebug and you'll see the difference 
too. My coworker is planning to jump into the AjaxCFC code and fix this, 
but has yet to find the time.

*
Ken Ferguson
214.636.6126
*






Brad Wood wrote:
 Ok, so I've got ajaxcfc running pretty smoothly, but I still need some
 help with my major catching point-cfhtmlhead.

  

 As part of my CFC, I cfsavecontent a page from our application and
 return the html to stick in an the innerHTML of a div on the ajax page.
 Our application uses cfhtmlhead a lot to stick javascript in the head of
 the document for various reasons.  The problem is that CF appends the
 htmlhead information to the top of the return value that my CFC sends
 back to the browser and that really screws stuff up.  Ajaxcfc sees this
 coming back from the webservice:

  

  

 script language=JavaScript1.2 type=text/javascript

 !--

 This comes from the cfhtmlhead tag and totally screws up
 ajaxcfc

 --

 /script

  

 _4304_1153931164505 = 'This is my content being returned';

 DWREngine._handleResponse('4304_1153931164505', _4304_1153931164505);

  

 So the obvious answer here is probably Don't use cfhtmlhead you idiot,
 but I'm trying to NOT have to write as much as my application as
 possible-I want a scalable fix that will still let me include or
 cfmodule any page in my app and simply return the resulting HTML from
 the CFC.  I can find every instance of cfhtmlhead and put an if
 statement around it or something, that that sounds like a kludgy fix.  



 Is there a pretty way to handle this?

  

 ~Brad

 



 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:247793
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Need help with CFHTMLHEAD in CF 5.0

2005-03-02 Thread Ali Awan
I'm running into somewhat of a problem in a CF 5 app I'm running.

I have a javascript snippet that checks for plugins before a specific page 
executes.  Everything is working fine, except when I cflocation to the next 
page, the http headers are displayed on the page.

This is what displays on top of the page

HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Wed, 02 Mar 2005 17:44:49 GMT 
Connection: close Content-type: text/html Page-Completion-Status: Normal 
Page-Completion-Status: Normal 

How can I get that to not display on the page?


This is how I'm calling the javascript snippet on the caller page:
cfsavecontent variable=pluginCheck
cfinclude template=PluginCheck.cfm
/cfsavecontent
cfhtmlhead text=#pluginCheck#

If I just include the PluginCheck.cfm as-is, the javascript doesn't execute, if 
I put HTML and Head tags in PluginCheck.cfm, the javascript doesn't execute.  
The only way I could get it to work was by using the cfhtmlhead tag.  But the 
only drawback is that it displays the html headers as described above.

Any help is greatly appreciated.

Thanks,
Ali

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197142
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Need help with CFHTMLHEAD in CF 5.0

2005-03-02 Thread Jochem van Dieten
Ali Awan wrote:
 I'm running into somewhat of a problem in a CF 5 app I'm running.
 
 I have a javascript snippet that checks for plugins before a specific page 
 executes.  Everything is working fine, except when I cflocation to the next 
 page, the http headers are displayed on the page.
 
 This is what displays on top of the page
 
 HTTP/1.1 200 OK Server: Microsoft-IIS/5.0 Date: Wed, 02 Mar 2005 17:44:49 GMT 
 Connection: close Content-type: text/html Page-Completion-Status: Normal 
 Page-Completion-Status: Normal 
 
 How can I get that to not display on the page?

Is your cfhtmlhead before or after your cflocation?

Jochem

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197149
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re:Need help with CFHTMLHEAD in CF 5.0

2005-03-02 Thread Ali Awan
Firstly,

 

 

 

I'd like to apologize if I end up sending 10 duplicate copies of this
response.  It didn't seem to work via the website.

 

Anyway.

 

 

 

To answer your question, Jochem.

 

The CFHTMLHead is called before the CFLocation.

 

However, the javascript that is included in the cfhtmlhead does some
javascript locations.

 

 

 

Ali

 

 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197167
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: PHP equivalent of cfhtmlhead

2005-01-28 Thread Jim Davis
 -Original Message-
 From: Figy, Kam [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 27, 2005 2:21 PM
 To: CF-Talk
 Subject: RE: OT: PHP equivalent of cfhtmlhead
 
 You could hack around something like that with cfsavecontent...

Not really - this solution only works if you can define all content before
the include point.

What I'd really like is to define the content anyplace on the page and then
include it (or append to it) anyplace on the page.

Jim Davis




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192113
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: PHP equivalent of cfhtmlhead

2005-01-27 Thread Figy, Kam
You could hack around something like that with cfsavecontent...

cfsavecontent var=body
...
/cfsavecontent

cfsavecontent var=header
...
/cfsavecontent

cfoutput
#header#
#body#
/cfoutput

I dunno if PHP has anything analogous to cfsavecontent but if so that
might be a good option. It modularizes your layout too, which is nice.

kam 

-Original Message-
From: Jim Davis [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 1:57 PM
To: CF-Talk
Subject: RE: OT: PHP equivalent of cfhtmlhead

 -Original Message-
 From: Figy, Kam [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 25, 2005 4:48 PM
 To: CF-Talk
 Subject: RE: OT: PHP equivalent of cfhtmlhead
 
 It's also convenient if you want to have a global header include but 
 have page titles on a per-page basis.

I use CFHTMLHEAD a lot - but I do wish there was a more generic
processing for it.

I'd like to be able to set an include point someplace on the page then
later throw some content to it.

For example I grab a tickcount from the beginning of application.cfm and
at the end of OnRequestEnd.cfm.  I then dump that to the output.  But of
course that information is outside the HTML tags (since I use Custom
Tags to include Headers and Footers outside of the auto-includes).

It would be nice to set a place for that information: something like:

cfOutputInsertion name=MetricsData

And then later use something like:

cfOutputInsertion name=MetricsData Content=My Stuff Append=True

(Or something like that)

This is clearly what CFHTMLHEAD is doing already - I'd just like to make
it more generic.

Jim Davis







~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191996
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-26 Thread Adam Haskell
Style sheets belong in the head Javascript is valid in head and
body but you are running under a slightly different context in the
body most of the time it won't make a difference. We use javascript
in the body al ot to cut down bandwidth use...like reports run by
2000+ stores a day on weekly progress we write out the table head
using a javscript array of the days then looping it. Saves a
tremendeous amount of bandwidth.

Adam H

On Tue, 25 Jan 2005 11:16:03 -0600, Deanna Schneider
[EMAIL PROTECTED] wrote:
 Well, I don't think they'll validate, if they're outside the head, if that's
 a concern.
 
 - Original Message -
 From: Rick Root [EMAIL PROTECTED]
 To: CF-Talk cf-talk@houseoffusion.com
 Sent: Tuesday, January 25, 2005 11:15 AM
 Subject: Re: OT: PHP equivalent of cfhtmlhead
 
  Deanna Schneider wrote:
  I use it a lot for things like adding local styles to the head of a page.
  Or
  a local js function or something.
 
  Are there any browsers out there that ignore javascript and stylesheet
  information placed outside the head section?
 
  I guess i've never felt any pressing need to do that...
 
   - Rick
 
 
 
 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191785
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-26 Thread Keith Gaughan
Rick Root wrote:

 George Abraham wrote:
 
Well for the time being, this is what I found as an
acceptable/workable alternative:

http://www.zend.com/zend/art/buffering.php
 
 
 Ah yes, I've used ob_start() before... but isn't that pretty much only 
 for http headers?

God no! It's for general output buffering. When I'm doing stuff in PHP,
I use it to capture chunks of stuff to be inserted into a template
later. It's pretty useful.

K.

-- 
Keith Gaughan, Developer
Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland
http://digital-crew.com/


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191827
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread George Abraham
Using cfhtmlhead, you can dynamically add references to other
stylesheets or scripts that you don't normally want to clutter your
page with. Since it does the addition of these references to the head
section of the html before the html page is sent to the browser, it is
of great help.

George

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191715
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Figy, Kam
It's also convenient if you want to have a global header include but
have page titles on a per-page basis.

kam 

-Original Message-
From: George Abraham [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 25, 2005 11:17 AM
To: CF-Talk
Subject: Re: OT: PHP equivalent of cfhtmlhead

Using cfhtmlhead, you can dynamically add references to other
stylesheets or scripts that you don't normally want to clutter your page
with. Since it does the addition of these references to the head section
of the html before the html page is sent to the browser, it is of great
help.

George



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191734
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


RE: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Jim Davis
 -Original Message-
 From: Figy, Kam [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, January 25, 2005 4:48 PM
 To: CF-Talk
 Subject: RE: OT: PHP equivalent of cfhtmlhead
 
 It's also convenient if you want to have a global header include but
 have page titles on a per-page basis.

I use CFHTMLHEAD a lot - but I do wish there was a more generic processing
for it.

I'd like to be able to set an include point someplace on the page then
later throw some content to it.

For example I grab a tickcount from the beginning of application.cfm and at
the end of OnRequestEnd.cfm.  I then dump that to the output.  But of course
that information is outside the HTML tags (since I use Custom Tags to
include Headers and Footers outside of the auto-includes).

It would be nice to set a place for that information: something like:

cfOutputInsertion name=MetricsData

And then later use something like:

cfOutputInsertion name=MetricsData Content=My Stuff Append=True

(Or something like that)

This is clearly what CFHTMLHEAD is doing already - I'd just like to make it
more generic.

Jim Davis





~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191735
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread George Abraham
OK,
This is the only place I know where I might get an answer to this
question. What is the PHP equivalent of using cfhtmlhead to insert
stylesheet or javascript information before an HTML file is sent to
the browser?

Thanks,
George

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191696
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Mark Drew
I dont think there is one, only includes and what have you

Regards

Mark Drew


On Tue, 25 Jan 2005 11:29:39 -0500, George Abraham
[EMAIL PROTECTED] wrote:
 OK,
 This is the only place I know where I might get an answer to this
 question. What is the PHP equivalent of using cfhtmlhead to insert
 stylesheet or javascript information before an HTML file is sent to
 the browser?
 
 Thanks,
 George
 
 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191697
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Rick Root
George Abraham wrote:
 OK,
 This is the only place I know where I might get an answer to this
 question. What is the PHP equivalent of using cfhtmlhead to insert
 stylesheet or javascript information before an HTML file is sent to
 the browser?

There is no equivalent that I can think of.  I've never used 
cfhtmlhead either... seems like a pretty useless tag to me.

  - Rick


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191698
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Deanna Schneider
I use it a lot for things like adding local styles to the head of a page. Or 
a local js function or something.


 There is no equivalent that I can think of.  I've never used
 cfhtmlhead either... seems like a pretty useless tag to me.

  - Rick
 


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191701
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Rick Root
Deanna Schneider wrote:
 I use it a lot for things like adding local styles to the head of a page. Or 
 a local js function or something.

Are there any browsers out there that ignore javascript and stylesheet 
information placed outside the head section?

I guess i've never felt any pressing need to do that...

  - Rick


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191703
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Deanna Schneider
Well, I don't think they'll validate, if they're outside the head, if that's 
a concern.

- Original Message - 
From: Rick Root [EMAIL PROTECTED]
To: CF-Talk cf-talk@houseoffusion.com
Sent: Tuesday, January 25, 2005 11:15 AM
Subject: Re: OT: PHP equivalent of cfhtmlhead


 Deanna Schneider wrote:
 I use it a lot for things like adding local styles to the head of a page. 
 Or
 a local js function or something.

 Are there any browsers out there that ignore javascript and stylesheet
 information placed outside the head section?

 I guess i've never felt any pressing need to do that...

  - Rick


 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191704
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread George Abraham
Well for the time being, this is what I found as an
acceptable/workable alternative:

http://www.zend.com/zend/art/buffering.php

George

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191743
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread Rick Root
George Abraham wrote:
 Well for the time being, this is what I found as an
 acceptable/workable alternative:
 
 http://www.zend.com/zend/art/buffering.php

Ah yes, I've used ob_start() before... but isn't that pretty much only 
for http headers?

  - Rick


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.3 - Release Date: 1/24/2005


~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191751
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: OT: PHP equivalent of cfhtmlhead

2005-01-25 Thread George Abraham
Could be. I haven't actually implemented anything yet. Maybe it is
just the equivalent of cfheader.

George

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:191752
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations  Support: http://www.houseoffusion.com/tiny.cfm/54


Re: CFHTMLHEAD data

2004-05-13 Thread Nathan Strutz
#GetPageContext().getOut().getString()#

will return all of the rendered output thus far in a string. You can 
parse through that yourself to find the head section and see what's in 
there.

-nathan strutz
http://www.dopefly.com/

Tim Blair wrote:
 Morning...
 
 Is there any way that I can get hold of the data currently in the
 CFHTMLHEAD buffer that will be output as the page is rendered/delivered?
 
 Tim.

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




CFHTMLHEAD data

2004-05-13 Thread Tim Blair
Morning...

Is there any way that I can get hold of the data currently in the
CFHTMLHEAD buffer that will be output as the page is rendered/delivered?

Tim.

--
---
CF_CodingContest mode=judging newentries=false
Maze Solver - http://tech.badpen.com/cfcontest/
---
RAWNET LTD - Internet, New Media and ebusiness Gurus.
WE'VE MOVED - for our new address, please visit our
website at http://www.rawnet.com/ or call us any time
on 0800 294 24 24.
---
This message may contain information which is legally
privileged and/or confidential.If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
---
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CFHTMLHEAD data

2004-05-13 Thread Jim McAtee
I'm in the same situation (CF 5) and need to be able to have several tags
used in the course of generating a single page alter the contents.

If I can't get access to the data, what I'm thinking of doing is keeping
any data destined for the HTML headers in my own request scope variable
and then flushing it with a single call to cfhtmlhead in onrequestend.cfm.

Shouldn't the data be available as a named variable while CF is generating
the page output?

- Original Message - 
From: Tim Blair [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Thursday, May 13, 2004 4:39 AM
Subject: CFHTMLHEAD data

 Morning...

 Is there any way that I can get hold of the data currently in the
 CFHTMLHEAD buffer that will be output as the page is rendered/delivered?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Expense of cfhtmlhead tag?

2004-02-26 Thread Jim McAtee
I was wondering what the implications might be of using cfhtmlhead on every
page of a busy web site.It seems that to implement cfhtmlhead, CF has to
generate its page and when it encounters cfhtmlhead it places that html
header text within a variable that it keeps.Then when CF has finished
generating the page it has to go back through and search for head/head
tags in the generated content and insert the text.This strikes me as
potentially a very expensive operation.Any ideas?Maybe there are more
efficient ways of implementing the tag that haven't occurred to me.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Expense of cfhtmlhead tag?

2004-02-26 Thread Jim Davis
I'm not at all positive, but I think that it's probably more optimized than
that.

 
My guess would be that during syntax/format checking CF notes tags like
HEAD, CFHTMLHEAD, CFFLUSH, etc.Then during the runtime it's got a little
head start.

 
I'm not sure about this - but I've never noticed any sort of performance hit
from using it.

 
A test should be pretty easy to put together tho- but I doubt you'll see any
sort of major difference.

 
Jim Davis 

 
_

From: Jim McAtee [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 26, 2004 11:49 PM
To: CF-Talk
Subject: Expense of cfhtmlhead tag?

 
I was wondering what the implications might be of using cfhtmlhead on every
page of a busy web site.It seems that to implement cfhtmlhead, CF has to
generate its page and when it encounters cfhtmlhead it places that html
header text within a variable that it keeps.Then when CF has finished
generating the page it has to go back through and search for head/head
tags in the generated content and insert the text.This strikes me as
potentially a very expensive operation.Any ideas?Maybe there are more
efficient ways of implementing the tag that haven't occurred to me.
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




CFMODULE with CFHTMLHEAD?

2004-02-25 Thread rob.stokes
[Apologies if this occurs twice; I've sent it an hour ago but hasn't appeared on the list so I'm presuming it's gone down the blackhole route.]

Hi everyone,

I'd like to include a _javascript_ validation bunch of functions in the header using CFHTMLHEAD. Problem is, this _javascript_ is called normally using CFMODULE (Attributes have to set certain JS variables). Is there a way to include the returned contents of the CFMODULE (the _javascript_) in the HTML head using CFHTMLHEAD?

Cheers,
Rob
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Include a CFMODULE with CFHTMLHEAD?

2004-02-25 Thread rob.stokes
Hi everyone,

I'd like to include a _javascript_ validation bunch of functions in the header using CFHTMLHEAD. Problem is, this _javascript_ is called normally using CFMODULE (Attributes have to set certain JS variables). Is there a way to include the returned contents of the CFMODULE (the _javascript_) in the HTML head using CFHTMLHEAD?

Cheers,
Rob
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Include a CFMODULE with CFHTMLHEAD?

2004-02-25 Thread Barney Boisvert
cfsavecontent variable=myvar
cfmodule . /
/cfsavecontent 

cfhtmlhead text=#myvar# /

Cheers,
barneyb

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 25, 2004 9:06 AM
 To: CF-Talk
 Subject: Include a CFMODULE with CFHTMLHEAD?
 
 Hi everyone,
 
 I'd like to include a _javascript_ validation bunch of 
 functions in the header using CFHTMLHEAD. Problem is, this 
 _javascript_ is called normally using CFMODULE (Attributes have 
 to set certain JS variables). Is there a way to include the 
 returned contents of the CFMODULE (the _javascript_) in the 
 HTML head using CFHTMLHEAD?
 
 Cheers,
 Rob
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CFMODULE with CFHTMLHEAD?

2004-02-25 Thread Steve Nelson
One way to do it is to make cfhtmlhead work the way it should have been
originally defined... with an end tag. Here's a work around; copy this
code into a file called htmlhead.cfm in your customtags directory:

cfswitch _expression_=#thistag.executionmode#
 cfcase value=start

 /cfcase
 cfcase value=end
cfhtmlhead text=#thistag.generatedcontent#
cfset thistag.generatedcontent=
 /cfcase
/cfswitch

Then do this:

cf_htmlhead
// js code here
// cfmodule code here
//etc
/cf_htmlhead

Steve Nelson

[EMAIL PROTECTED] wrote:

 [Apologies if this occurs twice; I've sent it an hour ago but hasn't
 appeared on the list so I'm presuming it's gone down the blackhole
 route.]

 Hi everyone,

 I'd like to include a _javascript_ validation bunch of functions in the
 header using CFHTMLHEAD. Problem is, this _javascript_ is called
 normally using CFMODULE (Attributes have to set certain JS variables).
 Is there a way to include the returned contents of the CFMODULE (the
 _javascript_) in the HTML head using CFHTMLHEAD?

 Cheers,
 Rob

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Include a CFMODULE with CFHTMLHEAD?

2004-02-25 Thread rob.stokes
Thanks barney, I'll give it a whirl.

-Original Message-
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: 25 February 2004 7:27 pm
To: CF-Talk
Subject: RE: Include a CFMODULE with CFHTMLHEAD?

cfsavecontent variable=myvar
cfmodule . /
/cfsavecontent 

cfhtmlhead text=#myvar# /

Cheers,
barneyb

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, February 25, 2004 9:06 AM
 To: CF-Talk
 Subject: Include a CFMODULE with CFHTMLHEAD?
 
 Hi everyone,
 
 I'd like to include a _javascript_ validation bunch of 
 functions in the header using CFHTMLHEAD. Problem is, this 
 _javascript_ is called normally using CFMODULE (Attributes have 
 to set certain JS variables). Is there a way to include the 
 returned contents of the CFMODULE (the _javascript_) in the 
 HTML head using CFHTMLHEAD?
 
 Cheers,
 Rob
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: CFMODULE with CFHTMLHEAD?

2004-02-25 Thread Adrocknaphobia
wrap your current cfmodule call within a cfsavecontent block. then use that variable in cfhtmlhead.

-Adam

 -Original Message-
 From: Steve Nelson [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, February 25, 2004 07:26 PM
 To: 'CF-Talk'
 Subject: Re: CFMODULE with CFHTMLHEAD?
 
 One way to do it is to make cfhtmlhead work the way it should have been
 originally defined... with an end tag. Here's a work around; copy this
 code into a file called htmlhead.cfm in your customtags directory:
 
 cfswitch _expression_=#thistag.executionmode#
cfcase value=start
 
/cfcase
cfcase value=end
cfhtmlhead text=#thistag.generatedcontent#
cfset thistag.generatedcontent=
/cfcase
 /cfswitch
 
 Then do this:
 
 cf_htmlhead
 // js code here
 // cfmodule code here
 //etc
 /cf_htmlhead
 
 Steve Nelson
 
 [EMAIL PROTECTED] wrote:
 
  [Apologies if this occurs twice; I've sent it an hour ago but hasn't
  appeared on the list so I'm presuming it's gone down the blackhole
  route.]
 
  Hi everyone,
 
  I'd like to include a _javascript_ validation bunch of functions in the
  header using CFHTMLHEAD. Problem is, this _javascript_ is called
  normally using CFMODULE (Attributes have to set certain JS variables).
  Is there a way to include the returned contents of the CFMODULE (the
  _javascript_) in the HTML head using CFHTMLHEAD?
 
  Cheers,
  Rob
  
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




CFHTMLHEAD and appearance of HTTP header code in page

2002-10-14 Thread Gyrus

Can someone help?! I'm *sure* this topic was just discussed here, but I
can't find it on the list archives...

Basically, I'm getting some broken bits of code at the top of a certain
page, a mangled JS script and some of the HTTP header, like this:

Script type=text/javascript
[ ... full JS script ... ]
   /script
  HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Mon, 14 Oct 2002 16:42:38 GMT
Connection: close
Content-type: text/html

*Then* the page code proper starts, with html and so on. The JS code that
gets mangled and inserted at the top of the page is inserted with
CFHTMLHEAD, and does actually appear further down in its proper place.

It works fine on my local CFMX, the live server is CF4.0, though... Can
anyone point out that obvious little thing that's probably just been pointed
out on the list that'll fix the problem?!

TIA,

Gyrus
[EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
PGP key available

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: CFHTMLHEAD and appearance of HTTP header code in page

2002-10-14 Thread James Ang

Ah. I remember this. I wrote an internal paper for MedSeek regarding
this bug. :P

This only happens under these conditions:
1) MS Internet Explorer as the browser.
2) CFLOCATION is called AFTER CFHTMLHEAD has been called. To be really
sure, I think CFHTMLHead should not be in the same CFM Template as the
call to CFLOCATION, but I am not sure if this is really a factor.
3) Tested to exist in CF5. Have not tested with MX.

Timeline of how this happens:
1) Browser makes request for the CFM that has CFHTMLHead and CFLOCATION.
2) Server executes CFHTMLHead and store the string in a special
buffer.
3) Server executes CFLOCATION, dumps the buffer in 2 to the output
buffer, then dumps the standard HTTP header and HTML text (for
backwards compatibility for braindead browsers such as Mosaic 2.0) for a
HTTP 302 (Object Moved).
4) The HTTP header in 3 miscalculates the length of the HTTP payload,
and only accounted for the HTML text in 3, and not the other stuff in 2
(the CFHTMLHead buffer). Hence, the Content-Length header is totally
wrong.
5) MS I.E. thinking it is all hot and cool, decided to TRUST the
Content-Length in 4, and clears its buffer by the amount specified in
Content-Length, and hence, did not clear the CFHTMLHead stuff that it
received from the server.
6) Then MS I.E. dutifully picked up the following page based on the
Location HTTP header, and then dumped everything to the HTML rendering
engine which includes the HTML from the final page prepended with the
uncleared buffer in 2.

Hence, you get the junky stuff on top of the page.

Lesson? Try not to use CFHTMLHead until you are really really sure that
it is the FINAL page and the user won't be redirected.

The problem does not exist for Mozilla based browsers because I think
Mozilla wipes the buffer regardless of the value in content-length. :P
Maybe that's why Mozilla is so slow

And now, maybe Macromedia will fix this bug since it is easily
reproducible.


James Ang
Programmer
MedSeek, Inc.
[EMAIL PROTECTED]






-Original Message-
From: Gyrus [mailto:[EMAIL PROTECTED]] 
Sent: Monday, October 14, 2002 9:55 AM
To: CF-Talk
Subject: CFHTMLHEAD and appearance of HTTP header code in page


Can someone help?! I'm *sure* this topic was just discussed here, but I
can't find it on the list archives...

Basically, I'm getting some broken bits of code at the top of a certain
page, a mangled JS script and some of the HTTP header, like this:

Script type=text/javascript
[ ... full JS script ... ]
   /script
  HTTP/1.1 200 OK
Server: Microsoft-IIS/4.0
Date: Mon, 14 Oct 2002 16:42:38 GMT
Connection: close
Content-type: text/html

*Then* the page code proper starts, with html and so on. The JS code
that
gets mangled and inserted at the top of the page is inserted with
CFHTMLHEAD, and does actually appear further down in its proper place.

It works fine on my local CFMX, the live server is CF4.0, though... Can
anyone point out that obvious little thing that's probably just been
pointed
out on the list that'll fix the problem?!

TIA,

Gyrus
[EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
PGP key available


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



Re: CFHTMLHEAD and appearance of HTTP header code in page

2002-10-14 Thread Gyrus

Many thanks, James, your reply will be a useful reference for the future!

Gyrus
[EMAIL PROTECTED]
work: http://www.tengai.co.uk
play: http://www.norlonto.net
PGP key available
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



cfhtmlhead

2002-09-27 Thread Critter

oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript 
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseInt(screen.availWidth
 * .90)+,height=+parseInt(screen.availHeight * 
.90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
   
 /SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;


__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-09-27 Thread John Beynon

You tried cf_htmlhead instead? I had some issues with quotes etc in the
cfhtmlhead tag and htmlhead solved it...

Pretty sure that allows you do to:
cf_htmlhead
...javascript here
/cf_htmlhead

HTH,

John.

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]] 
Sent: 27 September 2002 17:09
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight *
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;



__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfhtmlhead

2002-09-27 Thread Kreig Zimmerman

And if you don't want to use a custom tag, and have CF 5, you can use 
CFSAVECONTENT to define your header info.

Try:

CFSAVECONTENT VARIABLE=goesinHead
SCRIPT TYPE=text/javascript // LANGUAGE attribute is redundant and has been 
deprecated
window.open(../index.cfm,mainApp,width=+parseInt(screen.availWidth * 
.90)+,height=+parseInt(screen.availHeight *
90)+,status=yes,top=0,left=0,resizable);
/SCRIPT
/CFSAVECONTENT
CFHTMLHEAD TEXT=#goesinHead#

..depending on your app design, you may have to include cfoutput tags 
around the SCRIPT in the CFSAVECONTENT area.

John Beynon wrote:

You tried cf_htmlhead instead? I had some issues with quotes etc in the
cfhtmlhead tag and htmlhead solved it...

Pretty sure that allows you do to:
cf_htmlhead
   ...javascript here
/cf_htmlhead

HTH,

John.

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]] 
Sent: 27 September 2002 17:09
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight *
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;




__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re[2]: cfhtmlhead

2002-09-27 Thread Critter

oi Kreig!!

cheers, i'll keep those suggestions in mind for future reference.

the magical reboot sorted all


-- 
Critz
 Macromedia Certified Advanced ColdFusion Developer
 CFX_BotMaster Network=Efnet
   Channel=ColdFusion Blog=http://blog.ctzc.com;





Friday, September 27, 2002, 12:39:48 PM, you wrote:

KZ And if you don't want to use a custom tag, and have CF 5, you can use 
KZ CFSAVECONTENT to define your header info.

KZ Try:

KZ CFSAVECONTENT VARIABLE=goesinHead
KZ SCRIPT TYPE=text/javascript // LANGUAGE attribute is redundant and has been 
deprecated
KZ window.open(../index.cfm,mainApp,width=+parseInt(screen.availWidth * 
.90)+,height=+parseInt(screen.availHeight *
KZ 90)+,status=yes,top=0,left=0,resizable);
KZ /SCRIPT
KZ /CFSAVECONTENT
KZ CFHTMLHEAD TEXT=#goesinHead#

KZ ..depending on your app design, you may have to include cfoutput tags 
KZ around the SCRIPT in the CFSAVECONTENT area.

KZ John Beynon wrote:

You tried cf_htmlhead instead? I had some issues with quotes etc in the
cfhtmlhead tag and htmlhead solved it...

Pretty sure that allows you do to:
cf_htmlhead
   ...javascript here
/cf_htmlhead

HTH,

John.

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]] 
Sent: 27 September 2002 17:09
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight *
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;




KZ 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-09-27 Thread Gaulin, Mark

Try using text= and not text=''.  You can get the double quotes in a
quoted string by doubling them up (so text=a string with another string
in it)

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 12:09 PM
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight *
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;



__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-09-27 Thread mynews

I usually do this:

cfsavecontent variable=script

  SCRIPT LANGUAGE=JavaScript TYPE=text/javascript

  window.open(../index.cfm,mainApp,width=+parseInt(screen.availWidth 
* .90)+,height=+parseInt(screen.availHeight *90)+,status=yes,top=0,left=0,r
esizable);

  /SCRIPT
/cfsavecontent
cfhtmlhead text=#script#

David Murphy
www.cfugcny.org



= = = Original message = = =

Try using text= and not text=''.  You can get the double quotes 
in a
quoted string by doubling them up (so text=a string with another 
string
in it)

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 12:09 PM
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight 
*
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;




__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-09-27 Thread Gaulin, Mark

That's a nice trick for handling long strings.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 2:32 PM
To: CF-Talk
Subject: RE: cfhtmlhead


I usually do this:

cfsavecontent variable=script

  SCRIPT LANGUAGE=JavaScript TYPE=text/javascript

  window.open(../index.cfm,mainApp,width=+parseInt(screen.availWidth 
* .90)+,height=+parseInt(screen.availHeight
*90)+,status=yes,top=0,left=0,r
esizable);

  /SCRIPT
/cfsavecontent
cfhtmlhead text=#script#

David Murphy
www.cfugcny.org



= = = Original message = = =

Try using text= and not text=''.  You can get the double quotes 
in a
quoted string by doubling them up (so text=a string with another 
string
in it)

-Original Message-
From: Critter [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 12:09 PM
To: CF-Talk
Subject: cfhtmlhead


oi CF-Talk,!!

  I've got a tag that says this:
  cfhtmlhead text='SCRIPT LANGUAGE=JavaScript
TYPE=text/javascriptwindow.open(../index.cfm,mainApp,width=+parseIn
t(screen.availWidth * .90)+,height=+parseInt(screen.availHeight 
*
90)+,status=yes,top=0,left=0,resizable);/SCRIPT'

  but when the page is processed all that shows is:
  SCRIPT LANGUAGE=JavaScript TYPE=text/javascriptvoid(0);
/SCRIPT


  any ideas?



  --
  Critz
   Macromedia Certified Advanced ColdFusion Developer
   CFX_BotMaster Network=Efnet
 Channel=ColdFusion Blog=http://blog.ctzc.com;





__
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-03-11 Thread Brian Scandale

Yeah, I thought of that except that the header gets parsed BEFORE I know what I want 
in the body tag... The cfincludes after the header might require the body onload 
statement...

Just like before I know what I'll put into the head tag the head is created... 
therefore the cfhtmlhead is a great tag... just need one for the body tag too!

thanks,




At 03:00 AM 3/11/02 -0500, you wrote:
Well, you could do something like this in your pages.

cfset variables.JavaHeader = 1

cfinclude template=incHeader.cfm

cfhtmlhead text=blah blah blah


Then in your incHeader.cfm, put something like this.

cfif isDefined(Variables.JavaHeader)
  body onLoad=JavaScriptFunctionCall()
cfelse
  body
/cfif

If you define variables.JavaHeader, it'll include it, if not it won't.

_
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brian Scandale [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 2:49 AM
To: CF-Talk
Subject: Re: cfhtmlhead


Sometimes I want to use cfhtmlhead to push some JavaScript into the
head tag.

Then in the body tag I want to include
onLoad=JavaScriptFunctionCall().

However, the body is part of the incHeader.cfm which is included on ALL
pages I'm using... so I need a way to place it there in a dynamic way.



At 01:09 AM 3/11/02 -0500, you wrote:
cfoutput :)

What are you trying to accomplish?

jon
Brian Scandale wrote:
 Is there a similar tag to cfhtmlhead that is used to add content
into the body tag?
 
 Can't seem to find it if it exists
 
 thanks,
 Brian
 
 



__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfhtmlhead

2002-03-11 Thread Jim McAtee

Either call the incHeader.cfm as a CF tag with an optional parameter, or
else set a variable before the cfinclude.  Within the body tag in that file,
look for the variable.  The variable could contain text to be inserted into
the body tag, or it could define the entire tag.

cfset bodytagtext = 'onLoad=JavaScriptFunctionCall()'
cfinclude template=incHeader.cfm

In incHeader.cfm:

cfparam name=bodytagtext default=
body text=black bgcolor=whitecfif Len(bodytagtext)
cfoutput#bodtytagtext#/cfoutput

Jim


- Original Message -
From: Brian Scandale [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 12:49 AM
Subject: Re: cfhtmlhead


 Sometimes I want to use cfhtmlhead to push some JavaScript into the
head tag.

 Then in the body tag I want to include
onLoad=JavaScriptFunctionCall().

 However, the body is part of the incHeader.cfm which is included on ALL
pages I'm using... so I need a way to place it there in a dynamic way.



 At 01:09 AM 3/11/02 -0500, you wrote:
 cfoutput :)
 
 What are you trying to accomplish?
 
 jon
 Brian Scandale wrote:
  Is there a similar tag to cfhtmlhead that is used to add content into
the body tag?
 
  Can't seem to find it if it exists
 
  thanks,
  Brian

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-03-11 Thread Steve Oliver

Yeah, I thought of that except that the header gets parsed BEFORE I know
what I want in the body tag... The cfincludes after the header might
require the body onload statement...
-
If you set the variable BEFORE you use the cfinclude tag, the header
get's parsed AFTER you set the variable.



_
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brian Scandale [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 3:29 AM
To: CF-Talk
Subject: RE: cfhtmlhead


Yeah, I thought of that except that the header gets parsed BEFORE I know
what I want in the body tag... The cfincludes after the header might
require the body onload statement...

Just like before I know what I'll put into the head tag the head is
created... therefore the cfhtmlhead is a great tag... just need one for
the body tag too!

thanks,




At 03:00 AM 3/11/02 -0500, you wrote:
Well, you could do something like this in your pages.

cfset variables.JavaHeader = 1

cfinclude template=incHeader.cfm

cfhtmlhead text=blah blah blah


Then in your incHeader.cfm, put something like this.

cfif isDefined(Variables.JavaHeader)
  body onLoad=JavaScriptFunctionCall()
cfelse
  body
/cfif

If you define variables.JavaHeader, it'll include it, if not it
won't.

_
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brian Scandale [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 2:49 AM
To: CF-Talk
Subject: Re: cfhtmlhead


Sometimes I want to use cfhtmlhead to push some JavaScript into the
head tag.

Then in the body tag I want to include
onLoad=JavaScriptFunctionCall().

However, the body is part of the incHeader.cfm which is included on ALL
pages I'm using... so I need a way to place it there in a dynamic way.



At 01:09 AM 3/11/02 -0500, you wrote:
cfoutput :)

What are you trying to accomplish?

jon
Brian Scandale wrote:
 Is there a similar tag to cfhtmlhead that is used to add content
into the body tag?
 
 Can't seem to find it if it exists
 
 thanks,
 Brian
 
 




__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfhtmlhead

2002-03-11 Thread Brian Scandale

Hummm Ok.

I'm going to have to dig a bit I'm using the fusebox methodology and incHeader is 
part of my first index.cfm which includes everything else necessary.

Let me see what I can do here.

thanks,
til tomorrow

Brian

At 01:09 AM 3/11/02 -0700, you wrote:
Either call the incHeader.cfm as a CF tag with an optional parameter, or
else set a variable before the cfinclude.  Within the body tag in that file,
look for the variable.  The variable could contain text to be inserted into
the body tag, or it could define the entire tag.

cfset bodytagtext = 'onLoad=JavaScriptFunctionCall()'
cfinclude template=incHeader.cfm

In incHeader.cfm:

cfparam name=bodytagtext default=
body text=black bgcolor=whitecfif Len(bodytagtext)
cfoutput#bodtytagtext#/cfoutput

Jim


- Original Message -
From: Brian Scandale [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, March 11, 2002 12:49 AM
Subject: Re: cfhtmlhead


 Sometimes I want to use cfhtmlhead to push some JavaScript into the
head tag.

 Then in the body tag I want to include
onLoad=JavaScriptFunctionCall().

 However, the body is part of the incHeader.cfm which is included on ALL
pages I'm using... so I need a way to place it there in a dynamic way.



 At 01:09 AM 3/11/02 -0500, you wrote:
 cfoutput :)
 
 What are you trying to accomplish?
 
 jon
 Brian Scandale wrote:
  Is there a similar tag to cfhtmlhead that is used to add content into
the body tag?
 
  Can't seem to find it if it exists
 
  thanks,
  Brian


__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cfhtmlhead

2002-03-10 Thread Brian Scandale

Is there a similar tag to cfhtmlhead that is used to add content into the body tag?

Can't seem to find it if it exists

thanks,
Brian

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfhtmlhead

2002-03-10 Thread Jon Hall

cfoutput :)

What are you trying to accomplish?

jon
Brian Scandale wrote:
 Is there a similar tag to cfhtmlhead that is used to add content into the body 
tag?
 
 Can't seem to find it if it exists
 
 thanks,
 Brian
 
 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: cfhtmlhead

2002-03-10 Thread Brian Scandale

Sometimes I want to use cfhtmlhead to push some JavaScript into the head tag.

Then in the body tag I want to include onLoad=JavaScriptFunctionCall().

However, the body is part of the incHeader.cfm which is included on ALL pages I'm 
using... so I need a way to place it there in a dynamic way.



At 01:09 AM 3/11/02 -0500, you wrote:
cfoutput :)

What are you trying to accomplish?

jon
Brian Scandale wrote:
 Is there a similar tag to cfhtmlhead that is used to add content into the body 
tag?
 
 Can't seem to find it if it exists
 
 thanks,
 Brian
 
 

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-03-10 Thread Steve Oliver

Well, you could do something like this in your pages.

cfset variables.JavaHeader = 1

cfinclude template=incHeader.cfm

cfhtmlhead text=blah blah blah


Then in your incHeader.cfm, put something like this.

cfif isDefined(Variables.JavaHeader)
  body onLoad=JavaScriptFunctionCall()
cfelse
  body
/cfif

If you define variables.JavaHeader, it'll include it, if not it won't.

_
steve oliver
senior internet developer
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brian Scandale [mailto:[EMAIL PROTECTED]] 
Sent: Monday, March 11, 2002 2:49 AM
To: CF-Talk
Subject: Re: cfhtmlhead


Sometimes I want to use cfhtmlhead to push some JavaScript into the
head tag.

Then in the body tag I want to include
onLoad=JavaScriptFunctionCall().

However, the body is part of the incHeader.cfm which is included on ALL
pages I'm using... so I need a way to place it there in a dynamic way.



At 01:09 AM 3/11/02 -0500, you wrote:
cfoutput :)

What are you trying to accomplish?

jon
Brian Scandale wrote:
 Is there a similar tag to cfhtmlhead that is used to add content
into the body tag?
 
 Can't seem to find it if it exists
 
 thanks,
 Brian
 
 


__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: cfhtmlhead

2002-01-10 Thread Dave Watts

 I have a question about the *ultra* nifty CF tag - cfhtmlhead.
 
 I have several blocks of code (specifically style sheets) and 
 I would like to include in my html rendered documents. I 
 currently use cfhtmlhead to accomplish this and was wondering 
 if there was a mechanism that would allow me to control the 
 order these blocks are included in the html rendered page. 
 Are the included on a first come, first included basis, or 
 are they controlled by some other methodology? Can I specify 
 the order of these?

I think that CF puts each one right before the closing HEAD tag in the order
that you specify them.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFHTMLHEAD

2001-03-27 Thread Brian Thornton

  CFHTMLHEAD TEXT="
  script
  !-- Hide the script from old browsers --
  function loadalert ()
  {alert("Your Message to Mike was sent.")
  }
  // --End Hiding Here --
  /script
  "

I get the error "Just in time compilation error

An unknown attribute 'Your' has been encountered at document position
(22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
the following attributes:

TEXT
The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
document position (18:3) to (18:13)."

If I remove the quotes from ("Your Message to Mike was sent.") It's fine but
the the alert doesn't happen

Any ideas I tread quot;



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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFHTMLHEAD

2001-03-27 Thread Howarth, Craig (IBK-NY)

Use single quotes in the alert() or use a custom tag to implement CFHTMLHEAD the way 
it should have been done:

cfif thistag.ExecutionMode IS "end"
cfhtmlhead text="#thistag.GeneratedContent#"
cfset thistag.GeneratedContent = ""
/cfif

Save this in a file called htmlhead.cfm and change your code to:

cf_htmlhead
  script
  !-- Hide the script from old browsers --
  function loadalert ()
  {alert("Your Message to Mike was sent.")
  }
  // --End Hiding Here --
  /script
/cf_htmlhead

Then you don't need to worry about the quotes.

Craig

 -Original Message-
 From: Brian Thornton [SMTP:[EMAIL PROTECTED]]
 Sent: Tuesday, March 27, 2001 3:22 PM
 To:   CF-Talk
 Subject:  CFHTMLHEAD
 
   CFHTMLHEAD TEXT="
   script
   !-- Hide the script from old browsers --
   function loadalert ()
   {alert("Your Message to Mike was sent.")
   }
   // --End Hiding Here --
   /script
   "
 
 I get the error "Just in time compilation error
 
 An unknown attribute 'Your' has been encountered at document position
 (22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
 the following attributes:
 
 TEXT
 The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
 document position (18:3) to (18:13)."
 
 If I remove the quotes from ("Your Message to Mike was sent.") It's fine but
 the the alert doesn't happen
 
 Any ideas I tread quot;
 
 
 

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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFHTMLHEAD

2001-03-27 Thread David E. Crawford

Caused by the use of double quotes in your "Alert" call. Either use all
single quotes or use the CF_HTMLHEADBLOCK custom tag from the Developer's
exchange which allows you to bracket the text you want put in the header.

DC
- Original Message -
From: "Brian Thornton" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 15:22
Subject: CFHTMLHEAD


   CFHTMLHEAD TEXT="
   script
   !-- Hide the script from old browsers --
   function loadalert ()
   {alert("Your Message to Mike was sent.")
   }
   // --End Hiding Here --
   /script
   "

 I get the error "Just in time compilation error

 An unknown attribute 'Your' has been encountered at document position
 (22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
 the following attributes:

 TEXT
 The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
 document position (18:3) to (18:13)."

 If I remove the quotes from ("Your Message to Mike was sent.") It's fine
but
 the the alert doesn't happen

 Any ideas I tread quot;




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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFHTMLHEAD

2001-03-27 Thread Bob Silverberg

Did you try a single quote?

-Original Message-
From: Brian Thornton [mailto:[EMAIL PROTECTED]]
Sent: March 27, 2001 3:22 PM
To: CF-Talk
Subject: CFHTMLHEAD


  CFHTMLHEAD TEXT="
  script
  !-- Hide the script from old browsers --
  function loadalert ()
  {alert("Your Message to Mike was sent.")
  }
  // --End Hiding Here --
  /script
  "

I get the error "Just in time compilation error

An unknown attribute 'Your' has been encountered at document position
(22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
the following attributes:

TEXT
The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
document position (18:3) to (18:13)."

If I remove the quotes from ("Your Message to Mike was sent.") It's fine but
the the alert doesn't happen

Any ideas I tread quot;
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: CFHTMLHEAD

2001-03-27 Thread Dan Allison

Try single quotes around your alert message.

Dan

-Original Message-
From: Brian Thornton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 27, 2001 3:22 PM
To: CF-Talk
Subject: CFHTMLHEAD


  CFHTMLHEAD TEXT="
  script
  !-- Hide the script from old browsers --
  function loadalert ()
  {alert("Your Message to Mike was sent.")
  }
  // --End Hiding Here --
  /script
  "

I get the error "Just in time compilation error

An unknown attribute 'Your' has been encountered at document position
(22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
the following attributes:

TEXT
The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
document position (18:3) to (18:13)."

If I remove the quotes from ("Your Message to Mike was sent.") It's fine but
the the alert doesn't happen

Any ideas I tread quot;
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFHTMLHEAD

2001-03-27 Thread Tim Painter

Change your double quotes to a single quote (the ones that open and close
your heading text)

  CFHTMLHEAD TEXT='
  script
  !-- Hide the script from old browsers --
  function loadalert ()
  {alert("Your Message to Mike was sent.")
  }
  // --End Hiding Here --
  /script
  '
- Original Message -
From: "Brian Thornton" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 3:22 PM
Subject: CFHTMLHEAD


   CFHTMLHEAD TEXT="
   script
   !-- Hide the script from old browsers --
   function loadalert ()
   {alert("Your Message to Mike was sent.")
   }
   // --End Hiding Here --
   /script
   "

 I get the error "Just in time compilation error

 An unknown attribute 'Your' has been encountered at document position
 (22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
 the following attributes:

 TEXT
 The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
 document position (18:3) to (18:13)."

 If I remove the quotes from ("Your Message to Mike was sent.") It's fine
but
 the the alert doesn't happen

 Any ideas I tread quot;




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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFHTMLHEAD

2001-03-27 Thread Jay Patton

maybe this:
'Your Message to Mike was sent.'
instead of:
"Your Message to Mike was sent."

???

Jay Patton
Web Design / Application Design
Web Pro USA
p. 406.549.3337 ext. 203
p. 1.888.5WEBPRO ext. 203
e. [EMAIL PROTECTED]
url. www.webpro-usa.com
- Original Message -
From: "Brian Thornton" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 1:22 PM
Subject: CFHTMLHEAD


   CFHTMLHEAD TEXT="
   script
   !-- Hide the script from old browsers --
   function loadalert ()
   {alert("Your Message to Mike was sent.")
   }
   // --End Hiding Here --
   /script
   "

 I get the error "Just in time compilation error

 An unknown attribute 'Your' has been encountered at document position
 (22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
 the following attributes:

 TEXT
 The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
 document position (18:3) to (18:13)."

 If I remove the quotes from ("Your Message to Mike was sent.") It's fine
but
 the the alert doesn't happen

 Any ideas I tread quot;




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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: CFHTMLHEAD

2001-03-27 Thread Brian Thornton

You have to double quote instead of single quote
- Original Message -
From: "Brian Thornton" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, March 27, 2001 12:22 PM
Subject: CFHTMLHEAD


   CFHTMLHEAD TEXT="
   script
   !-- Hide the script from old browsers --
   function loadalert ()
   {alert("Your Message to Mike was sent.")
   }
   // --End Hiding Here --
   /script
   "

 I get the error "Just in time compilation error

 An unknown attribute 'Your' has been encountered at document position
 (22:15) to (22:18) while processing tag CFHTMLHEAD. This tag can only take
 the following attributes:

 TEXT
 The last successfully parsed CFML construct was a CFHTMLHEAD tag occupying
 document position (18:3) to (18:13)."

 If I remove the quotes from ("Your Message to Mike was sent.") It's fine
but
 the the alert doesn't happen

 Any ideas I tread quot;




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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



CFHTMLHEAD no longer being parsed?

2001-02-14 Thread defective dreams

One of the servers at my host, sentris.com, no longer seems to be parsing
CFHTMLHEAD tags.

They're running CF 4.0.0 on NT with I dunno what service packs.

I'm sure this would be solved by moving to a CF 4.5.0 box, but I don't have
confidance in my host's ability to move my site without being down for days.
Until now, everything has been working fine on this box.

Any ideas of what I can tell my host to do to fix this other than upgrading
the server or moving me to a new server?

Thanks.


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

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



cfhtmlhead

2000-10-05 Thread wpdd

Does anyone examples of good uses for this tag ?
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: cfhtmlhead

2000-10-05 Thread Zachary Bedell

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Something like this:

html
head
blahblah
/head
body
blahblah
cfhtmlhead text="titleWhatever/title"
/body
/html

You could potentially figure out the title for the page from a DB
query or other operation and add it into the heading after you've
sent out the htmlhead.../head bit.

A pratical example:  You're displaying pages results and you want the
title to be something like:
titleYourSiteHere -- Displaying X to y of Z results/title

Chances are you might have to send out your page header before you
know the counts of items, so CFHTMLHEAD saves you there:
cfhtmlhead text="titleYourSiteHere -- Displaying #FirstRecord# to
#LastRecord of #TotalRecords# results/title"

It's also useful for sticking JavaScript into the head section
after the fact.

Best regards,
Zac Bedell

 -Original Message-
 From: wpdd [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 05, 2000 1:40 PM
 To: CF-Talk
 Subject: cfhtmlhead
 
 
 Does anyone examples of good uses for this tag ?
 --
 
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit 
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=list
 s/cf_talk or send a message to 
 [EMAIL PROTECTED] with 'unsubscribe' in the body.
 

-BEGIN PGP SIGNATURE-
Version: PGPfreeware 6.5.8 for non-commercial use http://www.pgp.com

iQA/AwUBOdzNyAraVoMWBwRBEQKOdgCg9Dt0i8BEIFA6R7HAhF/aGiDefCoAoIT5
HD6WCiOhxtTfDEqx1dDqB//U
=WfKG
-END PGP SIGNATURE-
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: cfhtmlhead

2000-10-05 Thread Eric Dawson

move javascript to header


From: "wpdd" [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Subject: cfhtmlhead
Date: Thu, 5 Oct 2000 13:39:37 -0400

Does anyone examples of good uses for this tag ?
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or 
send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
the body.

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: cfhtmlhead

2000-10-05 Thread Dave Watts

 Does anyone examples of good uses for this tag?

Sure. It's very handy for adding META tags or JavaScript function blocks to
the right part of the page.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: cfhtmlhead

2000-10-05 Thread Jaime Garza

One good example.  And one bad example (of side effects)

1 Good example

suppose you are writing this custom tag and you would like to have a piece
of script appear in the head/head area, just to be nice and orderly.
Well, use cfhtmlhead.  You have no access to the main page positioning
otherwise, unless you are also the owner of the main page calling your
custom tag.

This is in fact what happens when you use cfinput validate="date" for
example.  cfinput internally must use cfhtmlhead.  Magically it appears in
your code in the right place (use view source and you will see.)

Nice!

2. Bad example

Nothing too bad, you just need to be aware of the side effect.

What CF seems to do is keep this text buffer you specify, and hold it until
the last part of the CF processing.  When all is done, CF will scan the
output stream for the LAST /head in the code and insert this buffer RIGHT
THERE.  The problem is, if you are doing syndication and grabbing html
contents from another place, it may come with head/head itself without
you even knowing it.  It usually does not matter to IE or Netscape.  But it
matters to CF.

see this:

cfquery name="foo" datasource="whatever"select bigtext from contenttable
whereid=1/cfquery
html
head/head
body
  table
tr
  td
cfoutput#foo.bigtext#/cfoutput   here is the problem
  /td
/tr
  /Table
/body
/html

If by any chance #foo.bigtext# contains something that looks like a /head
it will insert your code there!  I even tried !--/head-- in the database
and it stills puts the code inside the comment.

I suspect that this multiple pass to the output stream is partially at fault
of why CF cannot flush the output while it is produced, the way ASP does it,
sending chunks of output while process is still pending.  It needs the whole
string first.

Jaime/



 -Original Message-
 From: wpdd [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, October 05, 2000 10:40 AM
 To: CF-Talk
 Subject: cfhtmlhead


 Does anyone examples of good uses for this tag ?
 --
 
 Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
 To Unsubscribe visit
 http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf
_talk or send a message to [EMAIL PROTECTED] with
'unsubscribe' in the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=listsbody=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



  1   2   >