Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#12260 closed bug (invalid)

selector on xml file breaks in internet explorer (all jquery versions)

Reported by: caruga Owned by: caruga
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

Description

Hi,

You can find my description of this bug @ https://forum.jquery.com/topic/this-line-fails-in-internet-explorer-but-not-firefox-or-chrome#14737000003544309

In brief, a certain xml file will fail to be read with the following selector: "idea:not(idea idea)" in internet explorer only, causing the code to halt at that point with "Object doesn't support this property or method jquery-1.7.2.js, line 5276 character 6"

If the xml file is a little less deep than the one I quoted in that link, the error won't occur.

Change History (6)

comment:1 Changed 7 years ago by anonymous

IE 9.

Object doesn't support this property or method jquery-1.8.0.js, line 4822 character 7

Safari, Firefox, and Opera work fine.

comment:2 Changed 7 years ago by timmywil

Owner: set to caruga
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/. Open the link and click to "Fork" (in the top menu) to get started.

comment:3 Changed 7 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

comment:4 Changed 6 years ago by Stephen

This issue still exists, I am parsing a XML file for a WMS server.

$.get(capabilitiesUrl, function (data) {
  $("WMT_MS_Capabilities Capability Layer Layer Name",  $(data)).each(function (i) {

Will throw the error mentioned above.

The work around provided in this thread (https://forum.jquery.com/topic/this-line-fails-in-internet-explorer-but-not-firefox-or-chrome#14737000003544309) works as expected

$.ajax({
  type: "GET",
  url: capabilitiesUrl,
  dataType: "text",
  cache: false,
  success: function (text) {
    var data = $($.parseXML(text));
    $("WMT_MS_Capabilities Capability Layer Layer Name",  $(data)).each(function (i) {

This is probably more a bug with Internet Explorer not treating the XML as a document but jQuery support should probably work in IE9 also.

comment:5 Changed 6 years ago by anonymous

Hi,

I am experiencing this problem in IE8 only. I am SOAP service and the payload is XML. IE9, Chrome and Firefox are all fine. I tried changing the data type to text, but it still fails. Is there a resolution to this problem? I do not have my cache set to false. Is this required?

Thanks

comment:6 in reply to:  5 Changed 6 years ago by anonymous

Hi,

I resolved my problem by simplifying my jQuery selector. Instead of doing

var myelement2 = $(xml).find("MyElement1 MyElement2"),

I am doing

var myelement1 = $(xml).find("MyElement1"); var myelement2 = $(myelement1).find("MyElement2");

This resolved the exception and jQuery finds the elements as expected.

Thanks

Replying to anonymous:

Hi,

I am experiencing this problem in IE8 only. I am SOAP service and the payload is XML. IE9, Chrome and Firefox are all fine. I tried changing the data type to text, but it still fails. Is there a resolution to this problem? I do not have my cache set to false. Is this required?

Thanks

Note: See TracTickets for help on using tickets.