JQuery AJAX Problem

// Expert user has replied.
G Gary Crean 3 years 5 months ago
11 4 0

I'm currently trying to use JQuery within the Neon envioroment, The idea was to load a configuration file in JSON format from the local file system using Ajax. This file then would be the configuration for the rest of the workflow. Using the attached file's copied onto the unit, it produces an error, However in Pocket IE and desktop browsers it works fine. I'm not sure if it has anything to do with file access permission to local data or something else. Any help would be very appreciated. Regards, Gary.

Please Register or Login to post a reply

4 Replies

G Gary Crean

Hi There Rob, Just tried the files provided, It work fine. However the I was trying to retrieve the file from local file system rather than the internet. I was trying the index.html file and jquery-1.6.1.min.js file in a folder called Testapp and modified the Config.xml. This didn't work, Thinking that this maybe a path issue I copied the file's to the root of the device. However still unable to work in Neon. Pocket IE works though. Regards, Gary.

G Gary Crean

I'm not sure if this is relevant, It seems that webkit has an  Access-Control-Allow-Origin flag that allows access to local file system. Just throwing it out there. Gary.

R Robert Galvin

Gary Thanks for sharing. Not sure why this is happening. I think there are probably different ways to do AJAX with jQuery. See attached slighty modified code that shows an ajax example with Flicker using jQuerys JSON method and AJAX. Is this something you can use in the meantime.

R Robert Galvin

Attached is the same Flickr example but using the jQuery .Ajax() method instead of the .getJSON() method (like you original code). I think the problem of the original example may be in redisplaying the HTML. Hope this helps.

CONTACT
Can’t find what you’re looking for?