Skip to main content

Bug Tracker

Side navigation

#7094 closed bug (duplicate)

Opened September 28, 2010 02:59PM UTC

Closed September 28, 2010 06:52PM UTC

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) {}

},

Attachments (0)
Change History (1)

Changed September 28, 2010 06:52PM UTC by snover comment:1

resolution: → duplicate
status: newclosed

Duplicate of #6298.