executing variables

how do you execute the contents of a variable? here is an example of what i'm trying to do.

temp = "document.write"

now i want to execute the contents of temp to get the return value, which in this case would be . . . .

function write() { [native code] }

or another example shows this

temp = "window"

and i want it to return, after execution of centents, this . . .

[object]

HELP, thanx

fatdan1327@hotmail.com
http://fatdan.go.to

Comments

  • [b][red]This message was edited by the fatdan1327 at 2002-4-22 15:4:17[/red][/b][hr]
    nevermind, i found the eval() function, but now i came across another problem. when i send it lagit info (ie document.write or window) i get lagit return values, but when i send it bogus trash (ie asdska or siansk) it freezes up the runtime and diesn't execute anymore lines of code. HELP me sidestep this

    thanx

    fatdan1327@hotmail.com

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion