Welcome!

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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
New Member
Posts: 2
Registered: ‎09-04-2013
My Device: Bold 9300
My Carrier: Idea
Accepted Solution

Phonegap Blackberry App fails on ajax calls, gives 500 Internal Server Error

Hi All, I have developed an application which post an ajax call to the server aspx page.

 

The call fails when I am triggering it through Public IP address, but same works fine when triggered through a Local IP address.

 

The aspx page works fine when called through the browser, the issue is when ajax call is made from the app.

 

Everything works fine on Android and iOS versions Apps with the same code.

 

Also the config file has access origin set to all (*)

 

$.ajax({

url:LINK TO THE ASPX PAGE,

type: "POST",

processData:true,

data:{params},

crossDomain: true,

error: function(result)

{ alert(result.status + " " + result.statusText); },

success:

function(data) { alert("sucess"); }, });

 

Please Help, Thanks

Contributor
Posts: 14
Registered: ‎04-26-2012
My Device: storm2 9550
My Carrier: software developer

Re: Phonegap Blackberry App fails on ajax calls, gives 500 Internal Server Error

You will need to give the phonegap api an access to the uri u are posting to in your config.xml

e.g

<access subdomains="true" uri="http://www.google.com" />

 

------------------------------------------------------------------------------------------------------------------------------------------------------

Dont forget to hit the Like button as Accept as solution to help others if this post helps 

New Member
Posts: 2
Registered: ‎09-04-2013
My Device: Bold 9300
My Carrier: Idea

Re: Phonegap Blackberry App fails on ajax calls, gives 500 Internal Server Error

Yes I have provided access permission as

 

<access uri="*" />

 

I think it shoud allow all URL's

 

Is subdomains="true" neccessary, as I am not using any subdomains.

Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Phonegap Blackberry App fails on ajax calls, gives 500 Internal Server Error

<access uri="*" /> won't whitelist all URLs for Ajax calls; domains accessed via Ajax need to be explicitly white-listed.

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.