Solved

What to do when getAttributeNode doesn't work

Posted on 2003-10-27
3
232 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
Comment Utility
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Conditional Formatting 4 30
xml read and write 1 56
cleaning xml string 2 46
JPA XML tag definition 2 59
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…
Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now