Solved

What to do when getAttributeNode doesn't work

Posted on 2003-10-27
3
238 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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