Solved

What to do when getAttributeNode doesn't work

Posted on 2003-10-27
3
242 Views
Last Modified: 2012-06-27
The code at the bottom genereates an error in IE 5.5 at this line:
currentTitleAttr=allDivs[i].getAttributeNode("catTitle");
"Object doesn't support this property or method"
But it works fine in IE 6
The full function code
function expandEntity(elTitle) {
var allDivs=document.getElementsByTagName("DIV");
var i,currentTitleAttr,currentTitle;
      for (i=0; i <xsl:eval no-entities="t">"&lt;"</xsl:eval> allDivs.length; i++) {
            if (allDivs[i].hasChildNodes) {
                  currentTitleAttr=allDivs[i].getAttributeNode("catTitle");
                  if (currentTitleAttr) {
                        currentTitle=currentTitleAttr.value;
                        if (currentTitle) {
                              if (currentTitle==elTitle) {
                                    expand_WPQ_(allDivs[i]);
                              }//endif
                        }//endif
                  }//endif
            }//endif
      }//endfor
}//endfunction expandEntity

0
Comment
Question by:mjfox
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 26

Accepted Solution

by:
rdcpro earned 20 total points
ID: 9629830
This bit:

<xsl:eval no-entities="t">"&lt;"</xsl:eval>

is from the old MSXML 2 parser, and does not conform to the current spec.  I think you're doing a couple things wrong, but mainly mixing API's.  Please post the entire XSL, if it's not too big. This probaby works in IE6, because MSXML 3 is the default parser in IE6, and it is backwards compatible with MSXML 2.  It probalby does not work in IE 5.5, because you're including something, somewhere, that's part of MSXML 3, but IE5.5 used MSXML 2 by default (it's possible to configure IE 5.5 to use MSXML 3, though)

Regards,
Mike Sharp
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question