Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#6298 closed bug (fixed)

IE7,IE8 throw exception on new window.XMLHttpRequest();

Reported by: name5566 Owned by: john
Priority: high Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: IE7, IE8, xhr, XMLHttpRequest exception Cc:
Blocked by: Blocking:

Description

Microsoft failed to properly implement the XMLHttpRequest in IE7 and IE8.

Test Case: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.01 TransitionalEN" "http://www.w3.org/TR/html4/loose.dtd"> <html>

<head>

<script src="js/jquery/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>index.html</title> <script type="text/javascript" charset="utf-8">

$(function() {

$('a').click(function() {

$('div').load('register.html'); return false;

});

});

</script>

</head> <body>

<div></div> <a href="register.html">Here</a>

</body>

</html>

Open the IE8 or IE7 and then click the link(register.html) if you open the page, don't reload the page, and click the link at the first time.

IE7 window.XMLHttpRequest will throw a exception: Permission Denied IE8 window.XMLHttpRequest will throw a exception: Object don't support this property or method

if you reload the page, and click, on exception throw.

I try to fix it: xhr:function() { return window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); },

it be well.

Attachments (1)

index.html (571 bytes) - added by name5566 10 years ago.
use case

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by name5566

Attachment: index.html added

use case

comment:1 Changed 9 years ago by Bradley

#6480 and #6586 are duplicates. See #6586 for more info and additional test case.

comment:2 Changed 9 years ago by dmethvin

Note that the user (or in a company, the admin with the IEAK) has the ability to disable the "native" XMLHttpRequest object introduced starting in IE7. If you are encountering situations where the native object no longer works, check IE Tools, Internet Options, Advanced, Security, "Enable native XMLHTTP support."

There doesn't appear to be any way to tell when XHR has been disabled, and the document.XMLHttpRequest check still succeeds in IE even though it's disabled.

comment:3 Changed 9 years ago by snover

need: PatchCommit
Owner: set to john
Priority: undecided

#7094 is a duplicate of this bug.

Patch

comment:4 Changed 9 years ago by snover

Priority: undecidedhigh

#6728 is a duplicate of this bug.

comment:5 Changed 9 years ago by john

Resolution: fixed
Status: newclosed

comment:6 Changed 9 years ago by Bradley

#6333 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.