PDA

View Full Version : [OPEN] [OPEN-1092][3.??] nodeIndex property not supported in IE8 in DomqQuery



dplus
22 Sep 2009, 3:59 AM
Hi,

When I execute this DOMQuery:

var xml = Test.util.xml.loadXmlDoc('http://test/test.xml');
var node = Ext.DomQuery.selectNode('/results/data/*:nth-child(1)', xml);

I get the following error in IE:

Object doesn't support this property or method.

This does work in Firefox by the way.

See the attached screenshot.

Condor
22 Sep 2009, 4:29 AM
Can you post the Test.util.xml.loadXmlDoc implementation?

dplus
22 Sep 2009, 5:39 AM
Test.util.xml.loadXmlDoc = function (xml)
{
var xmlDoc = null;
try //Internet Explorer
{
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
}
catch (e1)
{
try //Firefox, Mozilla, Opera, etc.
{
xmlDoc = document.implementation.createDocument("", "", null);
}
catch (e2)
{
alert(e2.message);
}
}
try
{
xmlDoc.async = false;
xmlDoc.load(xml);
return xmlDoc;
}
catch (e3)
{
alert(e3.message);
}
return null;
};

evant
23 Sep 2009, 7:52 PM
It would also help if you could post the test document.

mjlecomte
18 Oct 2009, 8:51 AM
This thread has been in the INFOREQ status for some time with no new information posted. I'm going to update the status to CLOSED.

RonaldBrinkerink
30 Jun 2010, 11:00 PM
This thread has been in the INFOREQ status for some time with no new information posted. I'm going to update the status to CLOSED.

Could you open this up again as I'm havingthis problem also using an Ext.DomQuery with :nth-child selection optino\:

viewentry = q.selectNode('viewentry:nth-child(' + firstRecord + ')', dxl);

This works fine in ff but gives an error in IE8. Error line is 1253 in ext-all-debug

cn.nodeIndex = ++j

evant
30 Jun 2010, 11:02 PM
Please post a test case.

RonaldBrinkerink
1 Jul 2010, 1:14 AM
Ok, example:



Ext.Ajax.request({
url: 'http://development.brein.nl/brein/inproces/development/ip_portaal.nsf/luEntiteiten?readviewentries&_dc=1277973176535&startkey=widget.webbergen.website.&untilkey=widget.webbergen.website..',
method: "GET",
success: function(response) {
var node = Ext.DomQuery.selectNode('viewentry:nth-child(1)', response.responseXML);
}
})


XML Returned:


<?xml version="1.0" encoding="UTF-8"?>
<viewentries toplevelentries="101" rangeentries="2">
<viewentry position="97" unid="0F55337A76C68D9DC12577490015018A" noteid="BA6" siblings="101">
<entrydata columnnumber="0" name="classificatie">
<text>widget.webbergen.website.evenement</text></entrydata>
<entrydata columnnumber="1" name="gegevensbron">
<textlist><text>ipportaaldb</text></textlist></entrydata>
<entrydata columnnumber="2" name="schema">
<text>widget</text></entrydata>
</viewentry>
<viewentry position="98" unid="8A7E94A8354E599DC12577490014A880" noteid="B9E" siblings="101">
<entrydata columnnumber="0" name="classificatie">
<text>widget.webbergen.website.hoofdmenu</text></entrydata>
<entrydata columnnumber="1" name="gegevensbron">
<textlist><text>ipportaaldb</text></textlist></entrydata>
<entrydata columnnumber="2" name="schema">
<text>widget</text></entrydata>
<entrydata columnnumber="3" name="xtype">
<text>menunavigatie</text></entrydata>
</viewentry>
</viewentries>


This will result in an error in IE8 on line 1253 where it fails on the nodeIndex property.
In ff it works fine and node is the n-th node.