<?xml version="1.0" encoding="utf-8"?>
			
			<rss version="2.0" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:cc="http://web.resource.org/cc/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

			<channel>
			<title>Brian Meloche&apos;s Blog - AJAX</title>
			<link>http://www.brianmeloche.com/blog/index.cfm</link>
			<description>I&apos;ll blog about ColdFusion, weight loss, podcasting and life with too many pets! :-)</description>
			<language>en-us</language>
			<pubDate>Mon, 06 Sep 2010 21:01:34 -0400</pubDate>
			<lastBuildDate>Mon, 12 Feb 2007 15:08:00 -0400</lastBuildDate>
			<generator>BlogCFC</generator>
			<docs>http://blogs.law.harvard.edu/tech/rss</docs>
			<managingEditor>brian@brianmeloche.com</managingEditor>
			<webMaster>brian@brianmeloche.com</webMaster>
			<itunes:subtitle></itunes:subtitle>
			<itunes:summary></itunes:summary>
			<itunes:category text="Technology" />
			<itunes:category text="Technology">
				<itunes:category text="Podcasting" />
			</itunes:category>
			<itunes:category text="Technology">
				<itunes:category text="Tech News" />
			</itunes:category>
			<itunes:keywords></itunes:keywords>
			<itunes:author></itunes:author>
			<itunes:owner>
				<itunes:email>brian@brianmeloche.com</itunes:email>
				<itunes:name></itunes:name>
			</itunes:owner>
			<itunes:image href="" />
			<image>
				<url></url>
				<title>Brian Meloche&apos;s Blog</title>
				<link>http://www.brianmeloche.com/blog/index.cfm</link>
			</image>
			<itunes:explicit>no</itunes:explicit>
			
			<item>
				<title>Using ColdFusion for Dynamic Server-side JavaScript</title>
				<link>http://www.brianmeloche.com/blog/index.cfm/2007/2/12/Using-ColdFusion-for-Dynamic-Serverside-JavaScript</link>
				<description>
				
				Here&apos;s a little tip for using a .cfm file for dynamic JavaScript generation.

Need to use JavaScript, but not sure what the JS will actually look like until you build it... but don&apos;t want to show the JavaScript on the webpage?  I am using Spry for some Ajax style selects, but I need to control the XML on the fly.

Try something like this:

&lt;code&gt;
&lt;cfparam name=&quot;url.year&quot; default=&quot;#year(Now)#&quot;&gt;
...
&lt;script type=&quot;text/javascript&quot; src=&quot;/ClientIncludes/DynamicCFJS.cfm?year=#url.year#&quot;&gt;&lt;/script&gt;
&lt;/code&gt;

You could then have in your DynanicCFJS.cfm something like this:

&lt;code&gt;
&lt;cfsetting enablecfoutputonly=&quot;yes&quot; showdebugoutput=&quot;no&quot;&gt;
&lt;cfoutput&gt;
var dsYears = new Spry.Data.XMLDataSet(&quot;/index.cfm?event=buildYearList&amp;year=#url.year#&quot;, &quot;carlineYears/year&quot;, { useCache: true });
&lt;/cfoutput&gt;
&lt;/code&gt;

Of course, similar techniques will work in any web language.  Tailor to the web language of your choice. 
				</description>
				
				<category>ColdFusion</category>				
				
				<category>JavaScript</category>				
				
				<category>AJAX</category>				
				
				<pubDate>Mon, 12 Feb 2007 15:08:00 -0400</pubDate>
				<guid>http://www.brianmeloche.com/blog/index.cfm/2007/2/12/Using-ColdFusion-for-Dynamic-Serverside-JavaScript</guid>
				
				
			</item>
			</channel></rss>