Menu
Hi, is it possible to include js files in an external js?
For example, in “external.js,” can I call a function from “scriptA.js” like this?
document.write(“<script src=’scriptA.js’ language=’JavaScript’></script>”);
document.write(“<script src=’scriptB.js’ language=’JavaScript’></script>”);
functionFromScriptA();
The javascript console in Firefox prints out “Error: functionFromScriptA is not defined”
Are there any ways to get around this? I really want my js logic separated from my html page, preferably in one file.
Thanks!