locked
Dynamic Loaded JavaScript File issues

    Question

  • Hi, 

    I am using a existing code base in my application. In the code base, it loads a JavaScript file based on the settings in the app. Changing the settings, changes what JavaScript file it loads. While I continue to load the file dynamically, it breaks and does not work, yet it shows it inserted into the head of the page. If I link the file in directly before hitting "run", it works. The issue is that I have 30+ files where only 1 will ever be loaded at a time, based on the settings. If I load them all in at the start, then it uses only the last, defeating the purpose. 

    I have a few work ideas for getting around this by changing a few things in the code base. My question is if I have to go this route, or is there a way to make this work. I can't find anything about loading js files dynamically in W8 Apps. I know they are compiled for speed, and why this is frowned upon, but if it's a simple setting that would help me a lot and save me a lot of time.

    Thanks! 


    Zane C. Milakovic


    • Edited by Khrome83 Friday, January 11, 2013 12:54 AM
    Friday, January 11, 2013 12:53 AM

Answers