Solved

What to do when getAttributeNode doesn't work

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

Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Image decoding from Camera 3 106
Extract XML Data from using TSQL 5 75
Configure a Bean in an XML file 4 55
How do i delete the last node in an xml in T-SQL 7 26
The Problem How to write an Xquery that works like a SQL outer join, providing placeholders for absent data on the outer side?  I give a bit more background at the end. The situation expressed as relational data Let’s work through this.  I’ve …
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…
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…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.
Suggested Courses

737 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