I have a WebApp built in PhoneGap.
I read this article
So I tried to port my app to Windows Phone 8 and followed a Getting Started guide here.
I am using Marionette.js and Cordova 2.3.0rc2. I have an ajax call here.
$.ajax({
url : urlTemp + templateId + ".html", //This refers to a file in my local file system
data : {},
success : function(data) {
App.templates[templateId] = data;
callback.call(this, data);
},
error : function(err) {
alert('ERROR LOG: Error loading Template for: ' + urlTemp + templateId + ".html");
},
dataType : 'text'
});
Somehow this always goes in error. This works well in Android and IOS.
If it’s just a local file, you may be able to use the FileReader API instead of an AJAX request to read the file data.
http://docs.phonegap.com/en/2.2.0/cordova_file_file.md.html#FileReader
Edit: Just noticed you stated you are using 2.3.0. Removing my comments about it not yet supported in 2.2.