<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Including js files from within js files</title>
	<atom:link href="http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/</link>
	<description>Rich Internet Application development</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:10:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: chris</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-142902</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Tue, 01 Nov 2011 16:21:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-142902</guid>
		<description>Thanks for this. It&#039;s nice to have a clean head!</description>
		<content:encoded><![CDATA[<p>Thanks for this. It&#8217;s nice to have a clean head!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Kimler</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-142589</link>
		<dc:creator>Scott Kimler</dc:creator>
		<pubDate>Sun, 23 Oct 2011 17:38:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-142589</guid>
		<description>Thanks for posting. Working on a client site whose CMS allows JavaScript code, but not the ability to call an external .js file. Your code allows us to include that external file on per-post basis. Great!</description>
		<content:encoded><![CDATA[<p>Thanks for posting. Working on a client site whose CMS allows JavaScript code, but not the ability to call an external .js file. Your code allows us to include that external file on per-post basis. Great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CJ</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-141426</link>
		<dc:creator>CJ</dc:creator>
		<pubDate>Tue, 27 Sep 2011 00:38:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-141426</guid>
		<description>Heya Sharmo!

I was searching for this solution and the Google returned a familiar name!

Hope you are well mate. (And thanks for the JS tip).

CJ</description>
		<content:encoded><![CDATA[<p>Heya Sharmo!</p>
<p>I was searching for this solution and the Google returned a familiar name!</p>
<p>Hope you are well mate. (And thanks for the JS tip).</p>
<p>CJ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-138814</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 26 Jul 2011 23:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-138814</guid>
		<description>Wow... if you do this after the page loads, its almost like an ajax call or something. You could make the url of the script be anything... a server side handler for retrieving some JSON data mabye?</description>
		<content:encoded><![CDATA[<p>Wow&#8230; if you do this after the page loads, its almost like an ajax call or something. You could make the url of the script be anything&#8230; a server side handler for retrieving some JSON data mabye?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sarath krishna</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-137956</link>
		<dc:creator>sarath krishna</dc:creator>
		<pubDate>Sat, 09 Jul 2011 23:50:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-137956</guid>
		<description>wow..good idea..thank u michael.</description>
		<content:encoded><![CDATA[<p>wow..good idea..thank u michael.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: moe moe</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-136739</link>
		<dc:creator>moe moe</dc:creator>
		<pubDate>Wed, 22 Jun 2011 07:58:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-136739</guid>
		<description>How to invoke jsp file within the jButtonActionPerformed? Please help me.</description>
		<content:encoded><![CDATA[<p>How to invoke jsp file within the jButtonActionPerformed? Please help me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-136079</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 14 Jun 2011 04:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-136079</guid>
		<description>Joel:
I have been investigating this method of inclusion for jQuery core and possible effects.

The reason your error is occuring is due to the async problem mentioned a couple of times, basically the browser is still downloading the core file by the time it hits your &#039;$.(document)&#039; statement.

A way I can think of around this is to use a timer, if $ does not exist, start a timer and try again shortly.

Obvious issues with useing this method but is the only way I can see around the problem.

Anyone else have a better way to do this?</description>
		<content:encoded><![CDATA[<p>Joel:<br />
I have been investigating this method of inclusion for jQuery core and possible effects.</p>
<p>The reason your error is occuring is due to the async problem mentioned a couple of times, basically the browser is still downloading the core file by the time it hits your &#8216;$.(document)&#8217; statement.</p>
<p>A way I can think of around this is to use a timer, if $ does not exist, start a timer and try again shortly.</p>
<p>Obvious issues with useing this method but is the only way I can see around the problem.</p>
<p>Anyone else have a better way to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Raul</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-132998</link>
		<dc:creator>Raul</dc:creator>
		<pubDate>Tue, 10 May 2011 11:17:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-132998</guid>
		<description>Thanks man, nice solution!</description>
		<content:encoded><![CDATA[<p>Thanks man, nice solution!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joel</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-126942</link>
		<dc:creator>Joel</dc:creator>
		<pubDate>Thu, 03 Feb 2011 17:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-126942</guid>
		<description>Conceptually, this script is a great idea.  However, I&#039;ve tried to use it loading multiple jquery libraries and if I try to initialize jquery in the same file, with basic $(document.ready() syntax:

$(document).ready(function() {
    $(&#039;#cycle&#039;).cycle({
		fx: &#039;fade&#039; // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
});

 I get the following error:

ReferenceError: Can&#039;t find variable: $

The same jquery init code works fine if inside {script} tags in the header.  

Any thoughts?   Does jquery init code HAVE to go inline in an HTML doc?</description>
		<content:encoded><![CDATA[<p>Conceptually, this script is a great idea.  However, I&#8217;ve tried to use it loading multiple jquery libraries and if I try to initialize jquery in the same file, with basic $(document.ready() syntax:</p>
<p>$(document).ready(function() {<br />
    $(&#8216;#cycle&#8217;).cycle({<br />
		fx: &#8216;fade&#8217; // choose your transition type, ex: fade, scrollUp, shuffle, etc&#8230;<br />
	});<br />
});</p>
<p> I get the following error:</p>
<p>ReferenceError: Can&#8217;t find variable: $</p>
<p>The same jquery init code works fine if inside {script} tags in the header.  </p>
<p>Any thoughts?   Does jquery init code HAVE to go inline in an HTML doc?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Owen Roberts</title>
		<link>http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/comment-page-1/#comment-122023</link>
		<dc:creator>Owen Roberts</dc:creator>
		<pubDate>Tue, 09 Nov 2010 05:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2006/12/07/including-js-files-from-within-js-files/#comment-122023</guid>
		<description>Good stuff.
I turned off the script defer. I think its IE only.
Once I put any js with dependencies together, everything loads great. 
Have to remember that in IE and Chrome, these JS are loaded and run asynchronously.
This technique also works for loading CSS.
Cool!</description>
		<content:encoded><![CDATA[<p>Good stuff.<br />
I turned off the script defer. I think its IE only.<br />
Once I put any js with dependencies together, everything loads great.<br />
Have to remember that in IE and Chrome, these JS are loaded and run asynchronously.<br />
This technique also works for loading CSS.<br />
Cool!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk: enhanced

Served from: chapter31.nfshost.com @ 2012-02-09 08:54:09 -->
