B
Bruce
From within a class instantiation, I'm trying to set the value of a
global variable. Let's call that variable "x". I know I can do this
window.x = 5;
and it will work but I really need to do this:
x = 5;
The above works in Firefox 2 but not in IE6. Actually, I'm trying to
do this
eval("x = 5");
For reasons that are too long to explain, I can't do this
eval("window.x = 5");
(which I realize would also work) because I can't alter the variable
name. It has to be "x"
Any thoughts on how I can do this within the scope of a Class? I know
this is non standard and might seem odd or inadvisable but it's a long
story that will be solved if someone can help with my problem.
global variable. Let's call that variable "x". I know I can do this
window.x = 5;
and it will work but I really need to do this:
x = 5;
The above works in Firefox 2 but not in IE6. Actually, I'm trying to
do this
eval("x = 5");
For reasons that are too long to explain, I can't do this
eval("window.x = 5");
(which I realize would also work) because I can't alter the variable
name. It has to be "x"
Any thoughts on how I can do this within the scope of a Class? I know
this is non standard and might seem odd or inadvisable but it's a long
story that will be solved if someone can help with my problem.