I thought i had this sorted but it does not seem to check if the object is undefined / not created.
I'm trying to check if object is undefined & i tried a few methos but no luck
with the "value;" it returns the alert no to say that it is define where it is not
Please help
Expand|Select|Wrap|Line Numbers
- var a = document.getElementById('VE10110INTEFT').value;
- if (a === undefined)
- { alert("yes");} else { alert("no");}
- var a = document.getElementById('VE10110INTEFT').value;
- if (typeof(a) === undefined)
- var a = document.getElementById('VE10110INTEFT');
- if (typeof(a) == "undefined")
- var a = document.getElementById('VE10110INTEFT');
- if (a == "undefined")