Bug Tracker

Opened 12 years ago

Closed 12 years ago

#8571 closed bug (invalid)

$.get() returns different object type in IE8 and IE9

Reported by: anonymous Owned by: anonymous
Priority: undecided Milestone: 1.next
Component: ajax Version: 1.5.1
Keywords: Cc:
Blocked by: Blocking:

Description

Hi folks, using the following code, from jQuery 1.5.1:

$.get(xml_file).success(function(data, textStatus, jqXHR)) {

    alert(data);
}

The returned result seems to be:

On IE8 data is an "[object]"

On IE9 data is an "[object Document]

I guess it should always either be: "[object]" or: "[object Document]", not a mixture as this breaks code.

Regards, Yomodo

Change History (7)

comment:1 Changed 12 years ago by dmethvin

Owner: set to anonymous
Status: newpending

That is just the .toString interpretation of the data argument, which shouldn't necessarily break any code. Can you provide a test case that shows where this can be significant?

comment:2 in reply to:  1 ; Changed 12 years ago by Yomodo

I used a typeof comparison:

if (typeof === "[object]") if (typeof === "[object Document]")

That's when my existing code broke.

comment:3 Changed 12 years ago by Yomodo

(which brings it almost back to: http://bugs.jquery.com/ticket/8416)

comment:4 in reply to:  2 Changed 12 years ago by anonymous

Status: pendingnew

Replying to Yomodo:

I used a typeof comparison:

if (typeof === "[object]") if (typeof === "[object Document]")

That's when my existing code broke.

Sorry my previous post was considered SPAM??

I've "refined" the actual bug:

$.get(xml_file).success(function(data, textStatus, jqXHR)) {

alert(data.xml);

}

In IE8 this will alert the complete XML document. In IE9 it will alert: undefined.

comment:5 Changed 12 years ago by dmethvin

Status: newpending

Is this an HTA again? Can you post a jsFiddle for this?

comment:6 Changed 12 years ago by Rick Waldron

Component: unfiledajax

comment:7 Changed 12 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!

Note: See TracTickets for help on using tickets.