By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,127 Members | 1,366 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,127 IT Pros & Developers. It's quick & easy.

Using eval() inside a function

P: n/a
I've been using an eval() statement, which has been working fine until
I put it inside of a function. Is this a known problem, and is there a
known solution/work-around to this?

Mar 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Joel Byrd said on 22/03/2006 2:01 PM AEST:
I've been using an eval() statement, which has been working fine until
I put it inside of a function. Is this a known problem, and is there a
known solution/work-around to this?

There should be no problem with using eval() inside a function /per se/
- the use of eval() in general is strongly discouraged but there are no
specific issues with using it inside a function that should stop it
'working fine'.

Post a (small) example of the problem or a link, e.g.
function testEval(){
alert( eval('"hi"') );
}
testEval();
--
Rob
Mar 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.