On Oct 13, 5:24 pm, "T.J. Crowder" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> JavaScript provides the eval() function for this.
That would be considered an abuse of eval by most, bracket notation is
a much more appropriate solution.
<URL: http://www.jibbering.com/faq/#propertyAccessAgain >
All objects can be referenced as a property of some other object
except for the global object (which is essentially the window object
in browsers).
You can get a reference to the global object by assigning this to a
global variable in the global scope at the very start of a script as
follows:
var _global = this;
or from anywhere using:
var _global = (function() { return this})();
and then:
_global['someString']
will refer to the global property 'someString' (essentially
window['someString']).
--
Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---