<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eclipsed4utoo&#039;s Blog&#187; external</title>
	<atom:link href="http://eclipsed4utoo.com/blog/tag/external/feed/" rel="self" type="application/rss+xml" />
	<link>http://eclipsed4utoo.com/blog</link>
	<description>Not Your Ordinary Programmer</description>
	<lastBuildDate>Thu, 26 Aug 2010 12:45:19 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ASP.Net &#8211; AJAX and an External Javascript File</title>
		<link>http://eclipsed4utoo.com/blog/aspnet-ajax-external-javascript-file/</link>
		<comments>http://eclipsed4utoo.com/blog/aspnet-ajax-external-javascript-file/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 22:00:44 +0000</pubDate>
		<dc:creator>Ryan Alford</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[external]]></category>
		<category><![CDATA[javacript]]></category>

		<guid isPermaLink="false">http://eclipsed4utoo.com/blog/?p=264</guid>
		<description><![CDATA[Recently, I needed to add a color picker to a web application.  I thought I would try the new AJAX toolkit, but the toolkit was full of issues so I had to resort to doing it with javascript.  I downloaded a color picker that somebody had done(and donated for their development).
When I went to add [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I needed to add a color picker to a web application.  I thought I would try the new AJAX toolkit, but the toolkit was full of issues so I had to resort to doing it with javascript.  I downloaded a color picker that somebody had done(and donated for their development).</p>
<p>When I went to add the external javascript file and the other associated files, my AJAX page would no longer show up.  Anything inside of an UpdatePanel would not show up.  I did some searching and found that using an external javascript file can cause AJAX to fail.</p>
<p>I originally had this code which was giving me issues.</p>
<pre class="brush: xml;">
&lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;MainContent&quot; runat=&quot;server&quot;&gt;
    &lt;asp:ScriptManagerProxy ID=&quot;ScriptManagerProxy1&quot; runat=&quot;server&quot; /&gt;
    &lt;script src=&quot;../Javascript/jscolor/jscolor.js&quot; type=&quot;text/javascript&quot; /&gt;

    &lt;asp:UpdatePanel ID=&quot;UpdatePanel1&quot; runat=&quot;server&quot;&gt;
       &lt;%--   some controls  --%&gt;
    &lt;/asp:UpdatePanel&gt;
&lt;/asp:Content&gt;
</pre>
</pre>
<p>I used the <strong>ScriptReference </strong>in the <strong>ScriptManagerProxy</strong> to add a reference to the javascript file:</p>
<pre>
<pre class="brush: xml;">
&lt;asp:Content ID=&quot;Content1&quot; ContentPlaceHolderID=&quot;MainContent&quot; runat=&quot;server&quot;&gt;
    &lt;asp:ScriptManagerProxy ID=&quot;ScriptManagerProxy1&quot; runat=&quot;server&quot;&gt;
       &lt;Scripts&gt;
          &lt;asp:ScriptReference Path=&quot;~/Javascript/jscolor/jscolor.js&quot; /&gt;
       &lt;/Scripts&gt;
    &lt;/asp:ScriptManagerProxy&gt;

    &lt;asp:UpdatePanel ID=&quot;UpdatePanel1&quot; runat=&quot;server&quot;&gt;
       &lt;%--   some controls  --%&gt;
    &lt;/asp:UpdatePanel&gt;
&lt;/asp:Content&gt;
</pre>
</pre>
</pre>
<p>And that worked.  The controls inside the <strong>UpdatePanel</strong> now show up.</p>
<pre>
<pre></pre>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://eclipsed4utoo.com/blog/aspnet-ajax-external-javascript-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
