Solved

What to do when getAttributeNode doesn't work

Posted on 2003-10-27
3
240 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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. 
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 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