[thelist] A javascript question

jeff jeff at members.evolt.org
Thu May 17 16:38:16 CDT 2001


erik,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: Erik Mattheis
:
: variable = eval("something"+top.location+"something else");
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

this is not an appropriate use of eval() -- unless you're trying to evaluate
a string to a variable.

http://msdn.microsoft.com/scripting/jscript/doc/jsmtheval.htm

the example they give isn't a very good one as you can accomplish the very
same thing *without* using eval().

more info
http://developer.netscape.com/docs/manuals/js/client/jsref/toplev.htm#106379
5

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: I'm curious to know what the possible values
: are for "something" and "something else" - a
: window name and variable name in a frameset?
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

they are obviously strings -- hence the double-quotes around them.

hope this helps,

.jeff

name://jeff.howden
game://web.development
http://www.evolt.org/
mailto:jeff at members.evolt.org





More information about the thelist mailing list