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

Reply
Highlighted
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=-