Ajax plugin (XMLHttpRequest) can't load local file, because XMLHttpRequest only works for retrieving network resources. i.e. You cannot use it to access content from your applications local storage, i.e. XAP or IsolatedStorage.
http://social.msdn.microsoft.com/Forums ... =wpdevelop
1.please reconsider local!!! file ajax issue in wp8
ajax-plugin-doesn-t-work-properly-on-windows-phone-8-simulat_t97280
2.helpful link for resolving this issue
XMLHttpRequest only works for retrieving network resources. i.e. You cannot use it to access content from your applications local storage, i.e. XAP or IsolatedStorage.
http://stackoverflow.com/questions/1980 ... -html5-app
Accessing local file with Ajax on Windows phone 8
Resolved by adding isLocal:true in the ajax request
$.ajax({
url: "page.html",
dataType: "html",
async: false, // Otherwise Android 2.2 doesn't show menu
isLocal: true, // Or Windows Phone will say "Access is denied" to ajax request
success: function(html) {
//success code!
}
});
http://stackoverflow.com/questions/1567 ... ws-phone-8
I'm trying to load templates in WP8 PhoneGap app using jQuery.ajax with options isLocal=true and url="x-wmapp0:www/path/to/file.html". When I use jQuery 1.* all works fine. But using jQuery 2.* ajax returns an error "Error: Access is denied." It is because ajax in 1.* in IE works using window.ActiveXObject("Microsoft.XMLHTTP"). But in 2.* it is use XMLHttpRequest.
https://issues.apache.org/jira/browse/CB-5003
Add WP8 support for xhr requests to local files
https://github.com/enyojs/enyo/pull/234