The object I'm working on is instantiated in javascript, but used in VBSctipt. In one code path the variable M.DOM.IPt is defined and has a value, however, in the other it is not. I need to detect if it has been defined or not. I checked that M.DOM is defined and accessable in both code paths. Every test I have tried simply results in Error: Object doesn't support this property or method
.
I have tried:
IsEmpty(M.DOM.IPt)
M.DOM.IPt is Nothing
isNull(M.DOM.IPt)
Is there any way to detect the variable isn't defined and avoid the error?
note: I can put On Error Resume Next
in and it will simply ignore the error, but I actually need to detect it and conditionally do something about it.