<?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: Building JavaScript Widgets</title>
	<atom:link href="http://dtsn.co.uk/2009/03/15/building-javascript-widgets/feed/" rel="self" type="application/rss+xml" />
	<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 22 Mar 2011 17:27:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: daniel</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-221</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Tue, 22 Mar 2011 17:27:12 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-221</guid>
		<description>That is true, but in this article I am talking about delivering widgets to other sites. Which will suffer from the XSS restrictions.</description>
		<content:encoded><![CDATA[<p>That is true, but in this article I am talking about delivering widgets to other sites. Which will suffer from the XSS restrictions.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott M.</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-220</link>
		<dc:creator>Scott M.</dc:creator>
		<pubDate>Tue, 22 Mar 2011 17:21:46 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-220</guid>
		<description>I&#039;m confused by your statement that you can&#039;t use AJAX in a widget due to XSS rules and the Same Origin Policy.

If a user has come to my site and my site delivers a widget as part of my page(s), then there is no cross-domain issue, which makes using AJAX perfectly viable. 

Not only that but AJAX is a major component of most widgets built today.</description>
		<content:encoded><![CDATA[<p>I&#8217;m confused by your statement that you can&#8217;t use AJAX in a widget due to XSS rules and the Same Origin Policy.</p>
<p>If a user has come to my site and my site delivers a widget as part of my page(s), then there is no cross-domain issue, which makes using AJAX perfectly viable. </p>
<p>Not only that but AJAX is a major component of most widgets built today.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aungtastic</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-219</link>
		<dc:creator>aungtastic</dc:creator>
		<pubDate>Thu, 02 Dec 2010 05:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-219</guid>
		<description>Thanks Daniel. This is great info. And this will be helpful for a beginner to widget development. http://kentbrewster.com/badges/</description>
		<content:encoded><![CDATA[<p>Thanks Daniel. This is great info. And this will be helpful for a beginner to widget development. <a href="http://kentbrewster.com/badges/" rel="nofollow">http://kentbrewster.com/badges/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-188</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Fri, 07 May 2010 15:24:12 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-188</guid>
		<description>Hi,

Unfortunately you cannot protect against users rewriting certain JS functions, because their modifications would be loaded first. However you may be able to do something really clever and start using iFrames, this would solve both of your problems but is a bit tricky to get your head around (give this a read http://msdn.microsoft.com/en-us/library/bb735305.aspx). It really depends on what you are trying to display and whether a iFrame is applicable for this.

Daniel</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Unfortunately you cannot protect against users rewriting certain JS functions, because their modifications would be loaded first. However you may be able to do something really clever and start using iFrames, this would solve both of your problems but is a bit tricky to get your head around (give this a read <a href="http://msdn.microsoft.com/en-us/library/bb735305.aspx)" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb735305.aspx)</a>. It really depends on what you are trying to display and whether a iFrame is applicable for this.</p>
<p>Daniel</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. Scientist</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-187</link>
		<dc:creator>Dr. Scientist</dc:creator>
		<pubDate>Fri, 07 May 2010 15:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-187</guid>
		<description>Hello Daniel

I&#039;m going to bring a few issues that you might want to address in your article:

We recently worked on a pure client-side(JS) widget that used JSONP to request information from our server and display it on our target customer&#039;s web page.

Issues we encountered:
- We used jQuery and ran into problems with the client using another version of jQuery (outside our JS function). This was causing conflicts in versions. In fact, any library (such as mootools) would cause a conflict if included with jQuery. Since we had to accomodate any possibility we encapsulated our jQuery within our widget function as to keep it local. Essentially, our jQuery was only accessible within our function and did not rely on any external scripts
- Another problem was clients using the .prototype on objects such as Arrays. This was modifying the CORE javascript library. We have not yet found a solution to this but we need to either develop a test script to make sure the library isn&#039;t affected or simply hope they don&#039;t do anything too stupid

Let me know if you have some insight on this.</description>
		<content:encoded><![CDATA[<p>Hello Daniel</p>
<p>I&#8217;m going to bring a few issues that you might want to address in your article:</p>
<p>We recently worked on a pure client-side(JS) widget that used JSONP to request information from our server and display it on our target customer&#8217;s web page.</p>
<p>Issues we encountered:<br />
- We used jQuery and ran into problems with the client using another version of jQuery (outside our JS function). This was causing conflicts in versions. In fact, any library (such as mootools) would cause a conflict if included with jQuery. Since we had to accomodate any possibility we encapsulated our jQuery within our widget function as to keep it local. Essentially, our jQuery was only accessible within our function and did not rely on any external scripts<br />
- Another problem was clients using the .prototype on objects such as Arrays. This was modifying the CORE javascript library. We have not yet found a solution to this but we need to either develop a test script to make sure the library isn&#8217;t affected or simply hope they don&#8217;t do anything too stupid</p>
<p>Let me know if you have some insight on this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pearl</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-148</link>
		<dc:creator>Pearl</dc:creator>
		<pubDate>Tue, 05 Jan 2010 04:53:13 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-148</guid>
		<description>Hi Daniel,
Thanks for your guidance.It has helped me a lot.I have created a widget successfully.It would be live in some days.

Thanks,
Pearl</description>
		<content:encoded><![CDATA[<p>Hi Daniel,<br />
Thanks for your guidance.It has helped me a lot.I have created a widget successfully.It would be live in some days.</p>
<p>Thanks,<br />
Pearl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-129</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Sat, 05 Dec 2009 15:45:24 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-129</guid>
		<description>Hi Pearl,

The widget code for this is quite complicated and a bit difficult to explain over my blog. My advice is to use an already existing widget, like the Digg, dissect the JavaScript and see how it works. Unfortunately there isn&#039;t really an easier way to do this.

However you do need some server side bits and bobs, like you need to be able to output your data in a JSONP format (have a look at the JavaScript Weather article for a bit more information on this). Then process and render this data, you will have to be a creator on your site which will allow users to create the JavaScript with the options.

Hopefully this has helped you!</description>
		<content:encoded><![CDATA[<p>Hi Pearl,</p>
<p>The widget code for this is quite complicated and a bit difficult to explain over my blog. My advice is to use an already existing widget, like the Digg, dissect the JavaScript and see how it works. Unfortunately there isn&#8217;t really an easier way to do this.</p>
<p>However you do need some server side bits and bobs, like you need to be able to output your data in a JSONP format (have a look at the JavaScript Weather article for a bit more information on this). Then process and render this data, you will have to be a creator on your site which will allow users to create the JavaScript with the options.</p>
<p>Hopefully this has helped you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pearl</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-128</link>
		<dc:creator>Pearl</dc:creator>
		<pubDate>Sat, 05 Dec 2009 04:14:09 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-128</guid>
		<description>Hi Daniel,

That was indeed very informative :)
I am currently working on a magazine site.
I want to provide an option to my customers just as the twitter profile widget only difference being i want to show my magazine article in the widget &amp; provide options for customers to set the css &amp; no. of articles.Can you provide som reference to the tutorials or any other blogs wherein you have demonstrated the widget code.

Thanks,
Pearl</description>
		<content:encoded><![CDATA[<p>Hi Daniel,</p>
<p>That was indeed very informative <img src='http://dtsn.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
I am currently working on a magazine site.<br />
I want to provide an option to my customers just as the twitter profile widget only difference being i want to show my magazine article in the widget &amp; provide options for customers to set the css &amp; no. of articles.Can you provide som reference to the tutorials or any other blogs wherein you have demonstrated the widget code.</p>
<p>Thanks,<br />
Pearl</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daniel</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-125</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Tue, 01 Dec 2009 10:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-125</guid>
		<description>Hi Prasad,

There are a number of ways to over come retrieving data and sending data cross domain through JavaScript. For retrieving  data take a look at my most recent post (&lt;a href=&quot;http://dtsn.co.uk/2009/11/26/javascript-weather/&quot; rel=&quot;nofollow&quot;&gt;JavaScript Weather&lt;/a&gt;), it talks about JSONP. Stay tuned for tutorials on how to send data across domain.</description>
		<content:encoded><![CDATA[<p>Hi Prasad,</p>
<p>There are a number of ways to over come retrieving data and sending data cross domain through JavaScript. For retrieving  data take a look at my most recent post (<a href="http://dtsn.co.uk/2009/11/26/javascript-weather/" rel="nofollow">JavaScript Weather</a>), it talks about JSONP. Stay tuned for tutorials on how to send data across domain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prasad</title>
		<link>http://dtsn.co.uk/2009/03/15/building-javascript-widgets/comment-page-1/#comment-124</link>
		<dc:creator>Prasad</dc:creator>
		<pubDate>Tue, 01 Dec 2009 08:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://dtsn.co.uk/?p=530#comment-124</guid>
		<description>Hi daniel,

   Thanks for this nice tutor. I developed ajax based javascript widgets and those widgets can be used in social medias. I know there is a cross domain issue, but is there any other solution to overcome this??</description>
		<content:encoded><![CDATA[<p>Hi daniel,</p>
<p>   Thanks for this nice tutor. I developed ajax based javascript widgets and those widgets can be used in social medias. I know there is a cross domain issue, but is there any other solution to overcome this??</p>
]]></content:encoded>
	</item>
</channel>
</rss>

