![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I would like to be able to do this: curVarGood = 'YYYNNNY' var lcVar = 'curVarGood' -OR- var lcVar = 'curVarBad' if typeof(eval(lcVar)) == 'undefined' lcResult = 'NNNNNNN' //var undefined else lcResult = eval(lcVar) //good var to process but I get an undefined error on the first eval(), which is what I am trying to check for. I know the syntax above may not be exactly correct - I have tried lots of stuff. I just need to know the correct commands. |
#3
| |||
| |||
|
|
"Ken Murphy" <ken (AT) murphysoftware (DOT) net> kirjoitti viestissä:4-ydnak95fbGLvbenZ2dnUVZ_t2dnZ2d (AT) comcast (DOT) com... I would like to be able to do this: curVarGood = 'YYYNNNY' var lcVar = 'curVarGood' -OR- var lcVar = 'curVarBad' if typeof(eval(lcVar)) == 'undefined' lcResult = 'NNNNNNN' //var undefined else lcResult = eval(lcVar) //good var to process |
![]() |
| Thread Tools | |
| Display Modes | |
| |