Posted By

rportela on 10/09/09


Tagged

ajax delay loading


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

sigmund


Delay loading JS Files


 / Published in: JavaScript
 

  1. loadExternalJScript : function(scriptURL, id){
  2. var script = document.createElement('script');
  3. script.src = scriptURL;
  4. script.id = id;
  5. script.type = 'text/javascript';
  6. script.charset = 'utf-8';
  7. // Add the script to the head, upon which it will load and execute.
  8. var head = document.getElementsByTagName('head')[0];
  9. head.appendChild(script);
  10. }

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: rportela on October 9, 2009

Thanks go to Wolfram Kriesing for pointing this out

You need to login to post a comment.