Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

New Contributor
Posts: 2
Registered: ‎10-01-2012
My Device: 9930
My Carrier: Reliance

OS 5 Ajax Trouble



I am trying to develop a fairly simple app where the data is available as Json feed from the website and a simple html page show the data.


I am using PhoneGap 2.1.0,  JQuery Mobile  and WebWorks 


My Config.xml


<access subdomains="true" uri="*" />


I am faced with following two issues with my 9930 simulator for OS 5:


==> My ajax requests fail with "Request Timed our after  ~12000 error" for manaul XMLHttp requests.

==> The simulator while loading gives an error "Windows Command Processor Failed"


Here is the code I am trying out:


function grabFromServer(httpRequest)
httpConnection = new XMLHttpRequest();
var me = this;
if(httpConnection.readyState==4 && httpConnection.status==200)
httpConnection.open("GET", httpRequest,true);




Please help.

Posts: 162
Registered: ‎10-11-2011
My Device: BlackBerry 9810
My Carrier: Rogers

Re: OS 5 Ajax Trouble

Hi There,


Here are few suggestions. 


First of all, instead of using the <access subdomains="true" uri="*" />, can you try  specifying the actual domain?

And also, when working with phonegap, make sure to use the blackberry version of phonegap.js.


Let us know if this helped or not.




Naveen M



New Contributor
Posts: 2
Registered: ‎10-01-2012
My Device: 9930
My Carrier: Reliance

Re: OS 5 Ajax Trouble



Thanks for the reply. 


I had tried the <access> suggestion you made, also indeed using the blackberry version of phonegap.js.  Found that even <img> tags are not working.


Solved it by developing a custom phonegap plugin for downloading data and images. Images have to be base64 encoded so that the <img> tags can be fed encoded image rather than a url.


Thanks again. If you find a method to make the normal ajax / img src tags work, do let me know.