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
Developer
Posts: 49
Registered: ‎02-09-2011
My Device: Not Specified

local Ajax calls in jQuery+jQuery Mobile && a howto

I am working on an app using jQuery Mobile, its working out well so far, however is there a limitation for local:/// ajax requests? that is the main way jQuery Mobile does transitions and enables auto back buttons etc.. otherwise all the links have to be rel='external' which essentially loads the next page without all the awesome extra functionality.

 

in chrome you can disable the block on accessing local ajax calls, --allow-file-access-from-files and this lets you do:

 

$.mobile.changePage("dialogs/login.html", "dialog");

 which will load the file into the current page and do this with the url local:///index.html#login.html

auto enabling a back key etc..

 

 

I've enabled firebug to check this functionality out, to see if there is an error somewhere on my end:

 

 

<script type="text/javascript" src="https://getfirebug.com/firebug-lite-beta.js#enableTrace,startOpened=true"></script>

( make sure to enable the https://getfirebug.com/ domain in your config.xml:

  <access subdomains="true" uri="https://getfirebug.com"/>)

 

so now i can see in firebug that it is getting the login.html file, the data is there, but looks like

 

GET dialogs/login.html 0 X 24ms

 

and in the response I see that it actually has pulled the file, but for some reason its not loading it in.

from what I can tell its erroring out somewhere in jQuery Mobile, so I'm going to track that down.

 

What it looks like though is that there IS support for loading files with ajax locally? am I correct on this?

 

This is probably the core question, I would hate to start debugging this and find out that oh yeah, you cant do that Smiley Very Happy.

 

Thanks, I'll keep this updated with what I find, but any help is greatly appreciated,

-=Levi=-