I am not asking if the variable is undefined or if it is null. I want to check if the variable exists or not. Is this possible?
null
I use this function:
function exists(varname){ try { var x = eval(varname); return true; } catch(e) { return false; } }
Hope this helps.