Posted By

Carolyne on 06/27/10


Tagged

include externalise


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

Vordreller
jatkins


Include another JavaScript file


 / Published in: JavaScript
 

URL: http://www.cryer.co.uk/resources/javascript/script17_include_js_from_js.htm

Get one javascript file to include other required javascript files. Usefull when externalising blocks of code from html (Found at linked URL)

  1. function IncludeJavaScript(jsFile)
  2. {
  3. document.write('<script type="text/javascript" src="'
  4. + jsFile + '"></scr' + 'ipt>');
  5. }
  6. IncludeJavaScript('my_2nd_file.js');

Report this snippet  

You need to login to post a comment.