Try this on for size. You should be able to put it in your onrequestend file. It basically gets what CF generated, captures it, does a replace on the body tag with new content and outputs it. It worked in a simple test.
<CFSET myContent = getPageContext().getOut().getstring()> <CFSAVECONTENT VARIABLE="theJS"> <body> <script language="javascript1.1" src="/somedir" type="text/javascript"> xxCreatePageViewTag("Housewares","Cool Kitchen Gadgets","Page 1"); </script> </CFSAVECONTENT> <CFSET void = getPageContext().getOut().clearBuffer()> <CFOUTPUT> #replace(myContent, "<body>", theJS)# </CFOUTPUT> --Dave blog.dkferguson.com > Hello, > > I'm working on a project to change the web analysis tags on our CF8 > site. Currently we use onrequestend.cfm to tell the rendered page to > include the analysis javascripts at the end of the file and then put > in the </body> tag. > > We are changing brands and the javascripts must be included right > after the opening <body> tag. I can't think of a way to do this > without putting an cfinclude right after the <body> tag in every > document that requires it. There are about 50 template pages that make > up the site and I could add a <cfinclude> tag to every page but there > must be a better way that I don't know about. > > I will be dynamically adding values to the javascript tag such as: > > <script language="javascript1.1" > src="/somedir" > type="text/javascript"> > xxCreatePageViewTag("Housewares","Cool Kitchen Gadgets","Page 1"); > </script> > > Any suggestions are much appreciated. > > Thanks, Jerry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:302106 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4