Skip to content Skip to sidebar Skip to footer

Javascript Notify When Script Is Loaded Dynamically In IE

I have a small problem. I want to be notified when the script has finished loading. here is my code: var headID = document.getElementsByTagName('head')[0]; var new

Solution 1:

This is not particularly elegant solution but you can do an infinite loop and check if a variable in the loading script is set. If it is set then the script is loaded something like that:

    While(true){
         if( typeof foo != "unidentified" ){alert('loaded'); break;}
    }

Post a Comment for "Javascript Notify When Script Is Loaded Dynamically In IE"