Ticket #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: | ||
| Blocking: | Blocked by: |
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
comment:1 follow-up: ↓ 2 Changed 2 years ago by dmethvin
- Owner set to anonymous
- Status changed from new to pending
comment:2 in reply to: ↑ 1 ; follow-up: ↓ 4 Changed 2 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 2 years ago by Yomodo
(which brings it almost back to: http://bugs.jquery.com/ticket/8416)
comment:4 in reply to: ↑ 2 Changed 2 years ago by anonymous
- Status changed from pending to new
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 2 years ago by dmethvin
- Status changed from new to pending
Is this an HTA again? Can you post a jsFiddle for this?
comment:7 Changed 2 years ago by trac-o-bot
- Status changed from pending to closed
- Resolution set to invalid
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!
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

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?