Bug Tracker

Opened 9 years ago

Closed 9 years ago

#7094 closed bug (duplicate)

ajax request in ie7 doesn't work properly in some cases

Reported by: forewer2000 Owned by:
Priority: high Milestone: 1.4.3
Component: ajax Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Description

In some cases the window.XMLHttpRequest has a true return at ie7 but the window.XMLHttpRequest() still can't be created. If you put the return new window.XMLHttpRequest() in a try catch block and on error you return the activexobject instead of the xmlhttprequest then everything is working fine. This is the code from jquery:

xhr: window.XMLHttpRequest && (window.location.protocol !== "file:"
!window.ActiveXObject) ?

function() {

return new window.XMLHttpRequest();

} : function() {

try {

return new window.ActiveXObject("Microsoft.XMLHTTP");

} catch(e) {}

},

Change History (1)

comment:1 Changed 9 years ago by snover

Resolution: duplicate
Status: newclosed

Duplicate of #6298.

Note: See TracTickets for help on using tickets.