<?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: Mobile Spec is here</title>
	<atom:link href="http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/</link>
	<description>The life and times of the F-Major</description>
	<lastBuildDate>Fri, 02 Dec 2011 06:42:57 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Ezhil</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1430</link>
		<dc:creator>Ezhil</dc:creator>
		<pubDate>Mon, 03 May 2010 07:43:12 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1430</guid>
		<description>Hi

i am using the below XHR in balckberry.I am getting alert message in callback function.Response returns as [object object].i want to call xml file.please help me to parse it out

sample xml:


?

?

1.jpg

video
1.35
?






Code:

function doXHR() {  
    
    alert(&#039;in&#039;);		

       var testURL = &quot;http://www.google.com&quot;;  	 	

        var postDATA = null;  	 	

       var callback = function(response) {  		

alert(&#039;call back&#039;);
// Do stuff with the response data...  	

         alert(response);  	 	

        };   	

        navigator.network.XHR(testURL, postDATA, callback);  	 	

      }</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>i am using the below XHR in balckberry.I am getting alert message in callback function.Response returns as [object object].i want to call xml file.please help me to parse it out</p>
<p>sample xml:</p>
<p>?</p>
<p>?</p>
<p>1.jpg</p>
<p>video<br />
1.35<br />
?</p>
<p>Code:</p>
<p>function doXHR() {  </p>
<p>    alert(&#8217;in&#8217;);		</p>
<p>       var testURL = &#8220;http://www.google.com&#8221;;  	 	</p>
<p>        var postDATA = null;  	 	</p>
<p>       var callback = function(response) {  		</p>
<p>alert(&#8217;call back&#8217;);<br />
// Do stuff with the response data&#8230;  	</p>
<p>         alert(response);  	 	</p>
<p>        };   	</p>
<p>        navigator.network.XHR(testURL, postDATA, callback);  	 	</p>
<p>      }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1359</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Tue, 30 Mar 2010 14:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1359</guid>
		<description>Hi,
Maybe it is a bit late Brian, but the same happened to me, so I leave this for future references:

Data passed to the callback function, that is data returned by the http-get to the URL MUST be a JSON. Something like this would work fine:

var win = function(data) {
  alert(data.text);
};
navigator.network.XHR(’http://localhost:4023/Service1.asmx/HelloWorld’, null, win);


Where the data returned by the &quot;Service1.asmx/HelloWorld&quot; service is something like:
&quot;{text: &#039;Hello world&#039;}&quot;


Hope this helps!</description>
		<content:encoded><![CDATA[<p>Hi,<br />
Maybe it is a bit late Brian, but the same happened to me, so I leave this for future references:</p>
<p>Data passed to the callback function, that is data returned by the http-get to the URL MUST be a JSON. Something like this would work fine:</p>
<p>var win = function(data) {<br />
  alert(data.text);<br />
};<br />
navigator.network.XHR(’http://localhost:4023/Service1.asmx/HelloWorld’, null, win);</p>
<p>Where the data returned by the &#8220;Service1.asmx/HelloWorld&#8221; service is something like:<br />
&#8220;{text: &#8216;Hello world&#8217;}&#8221;</p>
<p>Hope this helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1181</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Tue, 10 Nov 2009 07:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1181</guid>
		<description>Hi Fil,
Thanks again for your help with this....unfortunately I still can&#039;t get this to work, allow me to show you what I&#039;m trying to accomplish here:

I set up a simple test web service that has a HelloWorld method.

Then I set up a test function that is called on a button click:

 function test() {

            alert(&#039;before call&#039;);

            navigator.network.XHR(&#039;http://localhost:4023/Service1.asmx/HelloWorld&#039;, null, win);

            alert(&#039;after call&#039;);

            alert(&#039;before function&#039;);

            var win = function(data) {
                alert(data);
            };            

           alert(&#039;after function&#039;);
    }

I then added an alert in the Network.prototype.XHR function (in phonegap.js) just to make sure it was being called -- and it is in fact being called on my button click.

The problem is that the success handler is not getting called. All my alerts before and after each step do come up.

Is there a later release of phonegap that I should be using?

Any insight into my problem would be greatly appreciated.

Thanks...Brian</description>
		<content:encoded><![CDATA[<p>Hi Fil,<br />
Thanks again for your help with this&#8230;.unfortunately I still can&#8217;t get this to work, allow me to show you what I&#8217;m trying to accomplish here:</p>
<p>I set up a simple test web service that has a HelloWorld method.</p>
<p>Then I set up a test function that is called on a button click:</p>
<p> function test() {</p>
<p>            alert(&#8217;before call&#8217;);</p>
<p>            navigator.network.XHR(&#8217;http://localhost:4023/Service1.asmx/HelloWorld&#8217;, null, win);</p>
<p>            alert(&#8217;after call&#8217;);</p>
<p>            alert(&#8217;before function&#8217;);</p>
<p>            var win = function(data) {<br />
                alert(data);<br />
            };            </p>
<p>           alert(&#8217;after function&#8217;);<br />
    }</p>
<p>I then added an alert in the Network.prototype.XHR function (in phonegap.js) just to make sure it was being called &#8212; and it is in fact being called on my button click.</p>
<p>The problem is that the success handler is not getting called. All my alerts before and after each step do come up.</p>
<p>Is there a later release of phonegap that I should be using?</p>
<p>Any insight into my problem would be greatly appreciated.</p>
<p>Thanks&#8230;Brian</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fil</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1180</link>
		<dc:creator>Fil</dc:creator>
		<pubDate>Mon, 09 Nov 2009 11:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1180</guid>
		<description>Brian,

Sure is! The solution is in the PhoneGap repository on GitHub. What I did is I implemented an HTTP request/callback mechanism, very similar to a classic XMLHttpRequest, in the BlackBerry native code. It&#039;s wrapped up in the NetworkCommand implementation of the BlackBerry PhoneGap source (see http://github.com/phonegap/phonegap/blob/master/blackberry/src/com/nitobi/phonegap/api/impl/NetworkCommand.java).

Here&#039;s the JavaScript API implementation for it, taken from the BlackBerry phonegap.js file at line 1073:

// Temporary implementation of XHR. Soon-to-be modeled as the w3c implementation.
Network.prototype.XHR = function(URL, POSTdata, successCallback) {
	var req = URL;
	if (POSTdata != null) {
		req += &quot;&#124;&quot; + POSTdata;
	}
	this.XHR_success = successCallback;
	PhoneGap.exec(&quot;network&quot;,[&quot;xhr&quot;,req]);
};

So, Brian, you would call something like this from your code:
var win = function(data) {alert(data);};
navigator.network.XHR(&#039;http://www.myservice.com/?param1=value1&#039;,null,win);

The second argument to the XHR function is text data to send as POST data in the request. Eventually, I am going to re-wrap this to mimic, as close as I can, the &#039;usual&#039; XHR implementation that we&#039;re all used to.

Hope that helps!
Fil</description>
		<content:encoded><![CDATA[<p>Brian,</p>
<p>Sure is! The solution is in the PhoneGap repository on GitHub. What I did is I implemented an HTTP request/callback mechanism, very similar to a classic XMLHttpRequest, in the BlackBerry native code. It&#8217;s wrapped up in the NetworkCommand implementation of the BlackBerry PhoneGap source (see <a href="http://github.com/phonegap/phonegap/blob/master/blackberry/src/com/nitobi/phonegap/api/impl/NetworkCommand.java)" rel="nofollow">http://github.com/phonegap/phonegap/blob/master/blackberry/src/com/nitobi/phonegap/api/impl/NetworkCommand.java)</a>.</p>
<p>Here&#8217;s the JavaScript API implementation for it, taken from the BlackBerry phonegap.js file at line 1073:</p>
<p>// Temporary implementation of XHR. Soon-to-be modeled as the w3c implementation.<br />
Network.prototype.XHR = function(URL, POSTdata, successCallback) {<br />
	var req = URL;<br />
	if (POSTdata != null) {<br />
		req += &#8220;|&#8221; + POSTdata;<br />
	}<br />
	this.XHR_success = successCallback;<br />
	PhoneGap.exec(&#8221;network&#8221;,["xhr",req]);<br />
};</p>
<p>So, Brian, you would call something like this from your code:<br />
var win = function(data) {alert(data);};<br />
navigator.network.XHR(&#8217;http://www.myservice.com/?param1=value1&#8242;,null,win);</p>
<p>The second argument to the XHR function is text data to send as POST data in the request. Eventually, I am going to re-wrap this to mimic, as close as I can, the &#8216;usual&#8217; XHR implementation that we&#8217;re all used to.</p>
<p>Hope that helps!<br />
Fil</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1179</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 09 Nov 2009 11:43:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1179</guid>
		<description>Hey Fil,
I really want to use PhoneGap as a solution for Blackberry apps, but I can&#039;t think of a workaround for the xmlhttprequest not working...any suggestions on how I could call a web service without it?</description>
		<content:encoded><![CDATA[<p>Hey Fil,<br />
I really want to use PhoneGap as a solution for Blackberry apps, but I can&#8217;t think of a workaround for the xmlhttprequest not working&#8230;any suggestions on how I could call a web service without it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tweets that mention Fil @ Nitobi » Blog Archive » Mobile Spec is here -- Topsy.com</title>
		<link>http://blogs.nitobi.com/fil/2009/11/04/mobile-spec-is-here/comment-page-1/#comment-1172</link>
		<dc:creator>Tweets that mention Fil @ Nitobi » Blog Archive » Mobile Spec is here -- Topsy.com</dc:creator>
		<pubDate>Wed, 04 Nov 2009 23:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/fil/?p=17#comment-1172</guid>
		<description>[...] This post was mentioned on Twitter by dave johnson, Fil Maj. Fil Maj said: Mobile spec (aka test suite) is here for PhoneGap! http://bit.ly/2k4IzN [...]</description>
		<content:encoded><![CDATA[<p>[...] This post was mentioned on Twitter by dave johnson, Fil Maj. Fil Maj said: Mobile spec (aka test suite) is here for PhoneGap! <a href="http://bit.ly/2k4IzN" rel="nofollow">http://bit.ly/2k4IzN</a> [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

