A
a.iliadis
Hi,
I have the following code:
function abc(){
eval('function __newfunc(){alert("hello");}');
}
abc();
now outside of that script context I try to call __newfunc(); and it
fails.
In firefox and opera all I had to do is change eval to window.eval to
force it to
execute in the window context. Unfortunetly that does not work with IE.
However
I could just do the following: window.__newfunc = __newfunc. and force
it to register.
My question is how can I do that without knowing the function name of
the one being
defined inside the eval expression, in this case __newfunc().
Thanks
I have the following code:
function abc(){
eval('function __newfunc(){alert("hello");}');
}
abc();
now outside of that script context I try to call __newfunc(); and it
fails.
In firefox and opera all I had to do is change eval to window.eval to
force it to
execute in the window context. Unfortunetly that does not work with IE.
However
I could just do the following: window.__newfunc = __newfunc. and force
it to register.
My question is how can I do that without knowing the function name of
the one being
defined inside the eval expression, in this case __newfunc().
Thanks