"Null" is null or not an object error in IE javascript
Posted
by
rossmcm
on Stack Overflow
See other posts from Stack Overflow
or by rossmcm
Published on 2010-05-24T23:37:45Z
Indexed on
2012/10/19
23:02 UTC
Read the original article
Hit count: 363
The following code executes fine in Firefox and Chrome, but gives an error:
'null' is null or not an object
when executed in Internet Explorer.
if (xmlhttp.responseXML != null)
{
var xmlDoc = xmlhttp.responseXML.documentElement ;
var ResultNodes = xmlDoc.getElementsByTagName ("Result") ; <---- error here
if (ResultNodes != null)
{
(I would have thought the line after the one indicated would be more likely to return the error but the debugger says the run-time error is at the line indicated)
Any ideas why?
© Stack Overflow or respective owner