In Javascript, I define global variables sld_label where label can be any string. These are initialised to objects that have a setval function. I need to check, within a function which is handed label in a string parameter called qq, whether sld_label has been defined. How do I do this without raising an error?
At the moment I have the following (which works but generates an error in Firebug) :-
function setclrques(qq,op)
{
if (typeof(eval('sld_'+qq))=='object') eval('sld_'+qq+'.setval('+op+')');
}
Help!