I am writing a Mobile App (PhoneGap) and want the ability to either run local JS file or download a new version of a JS file and use this version.
In the first instance, I am trying to set the 'src' attribute of the script object, which I can see it's work (using fiddler). But though I have loaded the script, I cannot access any of the objects, not sure why though.
My Code:
function LoadApplicationJs() {
var AppJs = localStorage.getItem("ApplicationJs");
if (AppJs == null) {
$("#Application").attr("src","Application.js");
}
}
LoadApplicationJs();
alert(app);
Any ideas?
Thanks Paul.