Skip to main content

Bug Tracker

Side navigation

#8571 closed bug (invalid)

Opened March 20, 2011 09:02AM UTC

Closed April 14, 2011 08:06AM UTC

$.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

Attachments (0)
Change History (7)

Changed March 20, 2011 09:45PM UTC by dmethvin comment:1

owner: → 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?

Changed March 21, 2011 07:33AM UTC by Yomodo comment:2

I used a typeof comparison:

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

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

That's when my existing code broke.

Changed March 21, 2011 12:03PM UTC by Yomodo comment:3

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

Changed March 21, 2011 12:16PM UTC by anonymous comment:4

status: pendingnew

Replying to [comment:2 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.

Changed March 30, 2011 05:45PM UTC by dmethvin comment:5

status: newpending

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

Changed March 30, 2011 08:09PM UTC by rwaldron comment:6

component: unfiledajax

Changed April 14, 2011 08:06AM UTC by trac-o-bot comment:7

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!