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

Eval() function not working on Safari...

P: 6
I am trying to fetch a dynamic variable something like

Expand|Select|Wrap|Line Numbers
  1. eval("variable" + number) 
On IE this evaluates fine. But Safari returns null every time!

I also tried

Expand|Select|Wrap|Line Numbers
  1. window["variable" + number] 
But that does not help either...

Please help....
Mar 4 '13 #1
Share this Question
Share on Google+
2 Replies

Expert Mod 15k+
P: 16,027
Can you post some more of your code, i.e. where you define this variable and where/when you're attempting to access this variable?
Mar 4 '13 #2

Expert Mod 5K+
P: 5,390
as far as i'm aware - eval works in all browsers - so to give a useful hint we need to see more of the code. since eval should always be avoided and is never needed in 'normal' javascripts - except when it comes to handle json-responses - that code should be replaced/improved anyway.
Mar 4 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.