"Null" is null or not an object error in IE javascript
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?

"Null" is null or not an object error in IE javascript
===

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?
