<?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: AJAST &#8211; Cross-domain REST calls using JSON injection</title>
	<atom:link href="http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/feed" rel="self" type="application/rss+xml" />
	<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection</link>
	<description>Håvard Stranden&#039;s website</description>
	<lastBuildDate>Tue, 20 Jul 2010 18:33:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-686</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Wed, 17 Mar 2010 09:55:51 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-686</guid>
		<description>&lt;p&gt;Ronaldo: OX.AJAST works by sending a parameter named &#039;callback&#039; with the request. The &lt;em&gt;value&lt;/em&gt; of &#039;callback&#039; is the function name. OX.AJAST generates function names dynamically to avoid cluttering between simultaneously dispatching calls.&lt;/p&gt;

&lt;p&gt;This means that for your example, you need to accept a parameter named &#039;callback&#039; on the server side, and reply with a script that calls a function named the value of the callback parameter.&lt;/p&gt;

&lt;p&gt;In other words, &lt;code&gt;http://yourhost/resource?callback=somethingGeneratedByOxAjast&lt;/code&gt; should give &lt;code&gt;somethingGeneratedByOxAjast(someData);&lt;/code&gt; in response.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ronaldo: OX.AJAST works by sending a parameter named &#8216;callback&#8217; with the request. The <em>value</em> of &#8216;callback&#8217; is the function name. OX.AJAST generates function names dynamically to avoid cluttering between simultaneously dispatching calls.</p>

<p>This means that for your example, you need to accept a parameter named &#8216;callback&#8217; on the server side, and reply with a script that calls a function named the value of the callback parameter.</p>

<p>In other words, <code><a href="http://yourhost/resource?callback=somethingGeneratedByOxAjast" rel="nofollow">http://yourhost/resource?callback=somethingGeneratedByOxAjast</a></code> should give <code>somethingGeneratedByOxAjast(someData);</code> in response.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ronaldo</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-685</link>
		<dc:creator>Ronaldo</dc:creator>
		<pubDate>Tue, 16 Mar 2010 19:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-685</guid>
		<description>&lt;p&gt;Hi. Nice code. But its raising to me: callback is not defined. I&#039;m using OX.AJAST.call(url, &#039;callback&#039;, f1, 1000, false); and my url give me callback(&#039;data&#039;);
I need some help.
Thanks,
Ronaldo.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi. Nice code. But its raising to me: callback is not defined. I&#8217;m using OX.AJAST.call(url, &#8216;callback&#8217;, f1, 1000, false); and my url give me callback(&#8216;data&#8217;);
I need some help.
Thanks,
Ronaldo.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: IStvan</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-666</link>
		<dc:creator>IStvan</dc:creator>
		<pubDate>Wed, 10 Feb 2010 13:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-666</guid>
		<description>&lt;p&gt;Great little code. 
Is it possible to change the request headers before the call? I&#039;d like to prevent caching. I was thinking to use cache-control no-cache as request header. Please help me how to inject that.&lt;/p&gt;

&lt;p&gt;thanks,
--IStvan&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Great little code. 
Is it possible to change the request headers before the call? I&#8217;d like to prevent caching. I was thinking to use cache-control no-cache as request header. Please help me how to inject that.</p>

<p>thanks,
&#8211;IStvan</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-665</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Wed, 10 Feb 2010 10:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-665</guid>
		<description>&lt;p&gt;Ali: This is weird. I suspect your issue is something else. Javascript always runs in a single thread (although the XHRs themselves are run asynchronously), so synchronization is not an issue.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ali: This is weird. I suspect your issue is something else. Javascript always runs in a single thread (although the XHRs themselves are run asynchronously), so synchronization is not an issue.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ali Salhi</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-663</link>
		<dc:creator>Ali Salhi</dc:creator>
		<pubDate>Sun, 07 Feb 2010 18:45:40 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-663</guid>
		<description>&lt;p&gt;Hi 
Great Work :D
helped me a lot with an application I am working on :D&lt;/p&gt;

&lt;p&gt;however there is a bug I would like to mention&lt;/p&gt;

&lt;p&gt;In my application I need to send like 4 to 5 requests &quot;one after the other (onload) &quot; to different servlets in a &quot;XYZ&quot; server. and since your callbackid variable is static , this will cause some unstable response and incorrect data!&lt;/p&gt;

&lt;p&gt;anyway :D ... I just changed this line:
var callbackid = &#039;callback&#039; + OX.AJAST.&lt;strong&gt;callid&lt;/strong&gt;;&lt;/p&gt;

&lt;p&gt;to:&lt;/p&gt;

&lt;p&gt;var callbackid = &#039;callback&#039; +Math.floor(Math.random()*9999999)+ OX.AJAST.&lt;strong&gt;callid&lt;/strong&gt;;&lt;/p&gt;

&lt;p&gt;thanks for this great lib :D&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi 
Great Work <img src='http://ox.no/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> 
helped me a lot with an application I am working on <img src='http://ox.no/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>

<p>however there is a bug I would like to mention</p>

<p>In my application I need to send like 4 to 5 requests &#8220;one after the other (onload) &#8221; to different servlets in a &#8220;XYZ&#8221; server. and since your callbackid variable is static , this will cause some unstable response and incorrect data!</p>

<p>anyway <img src='http://ox.no/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  &#8230; I just changed this line:
var callbackid = &#8216;callback&#8217; + OX.AJAST.<strong>callid</strong>;</p>

<p>to:</p>

<p>var callbackid = &#8216;callback&#8217; +Math.floor(Math.random()*9999999)+ OX.AJAST.<strong>callid</strong>;</p>

<p>thanks for this great lib <img src='http://ox.no/wordpress/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-652</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Fri, 15 Jan 2010 14:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-652</guid>
		<description>&lt;p&gt;Zohar: Thanks for the input, will fix and put up a revision soon (sorry for not providing a patched version on the site yet).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Zohar: Thanks for the input, will fix and put up a revision soon (sorry for not providing a patched version on the site yet).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Zohar Babin</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-646</link>
		<dc:creator>Zohar Babin</dc:creator>
		<pubDate>Mon, 04 Jan 2010 15:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-646</guid>
		<description>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;This library is great. however, I did manage to fix two things (1 is included above in the comments as well, but not fixed on the file linked from the article).&lt;/p&gt;

&lt;p&gt;Line 108:
OX.AJAST.Broker.&lt;strong&gt;callid&lt;/strong&gt;++) should be OX.AJAST.&lt;strong&gt;callid&lt;/strong&gt;++&lt;/p&gt;

&lt;p&gt;Line 123: replace the line with the following:
if (this.url.indexOf(&#039;?&#039;, 0) &gt; -1)
  this.url += &#039;&amp;&#039; + args.join(&#039;&amp;&#039;);
else
  this.url += &#039;?&#039; + args.join(&#039;&amp;&#039;);
OX.AJAST.call(this.url, this.cb, callback, this.timeout, this.jsonmode);&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi,</p>

<p>This library is great. however, I did manage to fix two things (1 is included above in the comments as well, but not fixed on the file linked from the article).</p>

<p>Line 108:
OX.AJAST.Broker.<strong>callid</strong>++) should be OX.AJAST.<strong>callid</strong>++</p>

<p>Line 123: replace the line with the following:
if (this.url.indexOf(&#8216;?&#8217;, 0) &gt; -1)
  this.url += &#8216;&amp;&#8217; + args.join(&#8216;&amp;&#8217;);
else
  this.url += &#8216;?&#8217; + args.join(&#8216;&amp;&#8217;);
OX.AJAST.call(this.url, this.cb, callback, this.timeout, this.jsonmode);</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Håvard</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-619</link>
		<dc:creator>Håvard</dc:creator>
		<pubDate>Thu, 26 Nov 2009 00:26:45 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-619</guid>
		<description>&lt;p&gt;AJAST works just fine in FF 3.5.5 (tested on my Mac).&lt;/p&gt;

&lt;p&gt;If anyone else experience problems, please let me know.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>AJAST works just fine in FF 3.5.5 (tested on my Mac).</p>

<p>If anyone else experience problems, please let me know.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: imran</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-607</link>
		<dc:creator>imran</dc:creator>
		<pubDate>Thu, 01 Oct 2009 05:42:37 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-607</guid>
		<description>&lt;p&gt;its a good read.. but somehow the library didnt work&lt;/p&gt;

&lt;p&gt;error INVALID LABEL in FF 3.5........didnt work for me!&lt;/p&gt;

&lt;p&gt;im realy stuck between these two cross domains..&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>its a good read.. but somehow the library didnt work</p>

<p>error INVALID LABEL in FF 3.5&#8230;&#8230;..didnt work for me!</p>

<p>im realy stuck between these two cross domains..</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Redding</title>
		<link>http://ox.no/posts/ajast-cross-domain-rest-calls-using-json-injection/comment-page-1#comment-537</link>
		<dc:creator>Jeff Redding</dc:creator>
		<pubDate>Wed, 24 Jun 2009 22:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://ox.no/posts/ajast-cross-domain-rest-calls-using-javascript-injection#comment-537</guid>
		<description>&lt;p&gt;Hi Havard,&lt;/p&gt;

&lt;p&gt;Thanks for your help. I am indeed running into the second injected tag issue with Firefox and was wondering how I can add a timeout and where to accomplish this in the certain cases I want to make back to back calls.&lt;/p&gt;

&lt;p&gt;Thanks again, great stuff here.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Havard,</p>

<p>Thanks for your help. I am indeed running into the second injected tag issue with Firefox and was wondering how I can add a timeout and where to accomplish this in the certain cases I want to make back to back calls.</p>

<p>Thanks again, great stuff here.</p>]]></content:encoded>
	</item>
</channel>
</rss>
