Reference methods defined in one JScript file from another JScript

Posted by Thomas Svensen on Stack Overflow See other posts from Stack Overflow or by Thomas Svensen
Published on 2010-06-16T14:42:14Z Indexed on 2010/06/17 9:03 UTC
Read the original article Hit count: 460

Filed under:
|

I am writing some server-side scripts using jscript and WSH. The scripts are getting quite long, and some common functions and variables would fit better in a general library script which I included in my various script instances.

But, I cannot find a way reference one JScript file from another. For a moment, I though reading the file contents and passing it to "eval()" could work. But, as it says on MSDN:

"Note that new variables or types defined in the eval statement are not visible to the enclosing program."

(http://msdn.microsoft.com/en-us/library/b51a45x6.aspx)

Is there any way to include/refence a JScript from another one?

© Stack Overflow or respective owner

Related posts about jscript

Related posts about wsh