URGENT: Run a script from in a script

Aug 5, 2010 at 3:42 AM


I am trying to dynamically load scripts into another script and then call them. For example, in my main script I load a new string, scriptCodeString, which contains the source code for a javascript function called build(). I then call


to load the script into the interpreter.

The next line of my javascript is then:


It should work, but it throws an exception. I therefore tried to call


But it also throws an exception. I am therefore stumped.

Can somebody please tell me how to execute a script from within a script?


Aug 19, 2010 at 6:17 AM
Hi, Have you tried using the version on svn ? This functionality was needed on the htmlx project (htmlx.codeplex.com). You should be able to find what you need. Otherwise, I think the eval function could fit your need. Did you also try it ?