Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

?exec() statement to execute arbitrary code. 1

Status
Not open for further replies.

bvallet

Programmer
Apr 10, 2001
52
US
Hopefully someone can help me, I'm drawing a blank. If I remember correctly, there is a function that allows you to execute an arbitrary string value, something like:

exec('window.open(window)');

The only problem is, I can't remember the name of the function and looking it up in a reference book index is like using a dictionary to check for a misspelled word, if I knew the name to look for, I wouldn't need to look it up.

Anyone know the name of this function, or am I just getting by languages confused (wouldn't be the first time)?

Thanks.
 
The method is eval(), of the window (or global) object. You can use either:

eval(somstring)

or

window.eval(somestring) jared@eae.net -
 
Thank you, for the life of me, I couldn't think of the name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top