Bug Tracker

Modify

Ticket #6298 (closed bug: fixed)

Opened 3 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

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

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

Change History

Changed 3 years ago by name5566

use case

comment:1 Changed 3 years ago by Bradley

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

comment:2 Changed 3 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 3 years ago by snover

  • need changed from Patch to Commit
  • Owner set to john
  • Priority set to undecided

#7094 is a duplicate of this bug.

 Patch

comment:4 Changed 3 years ago by snover

  • Priority changed from undecided to high

#6728 is a duplicate of this bug.

comment:5 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed

comment:6 Changed 3 years ago by Bradley

#6333 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.