Dynamic .js file in PhoneGap - Android

view full story

http://stackoverflow.com – I am trying to dynamically load a .js file my PhoneGap (Cordova) Android app but I can not get it to work. I need to access variables inside the imported .js file upon the loading of the main .js file. I either get errors for the below attempted methods as they are not supported within PhoneGap or I get errors as the variable from the imported .js file is undefined. I am looking for a method which has been confirmed as working from someone who has tested it within PhoneGap. I have tried the following all without success. $.getScript('/path/to/imported/script.js', function() { // script (HowTos)