Ticket #7012 (closed bug: worksforme)
Problem with Ajax on ie7
| Reported by: | ossarotte | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | ajax , load | Cc: | |
| Blocking: | Blocked by: |
Description
When call a jquery.load() function in Internet Explorer an error occurs on line 4995, there are the line where httpxmrequest is create. I found a patch, replace the code on a hrc line:
original:
<code>
| !window.ActiveXObject) ? |
function() {
return new window.XMLHttpRequest();
} : function() {
try {
return new window.ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {}
},
</code>
replace with
<code>
xhr: function()
{
var request = null; if(typeof window.ActiveXObject != 'undefined')
{
try { request = new ActiveXObject('Microsoft.XMLHTTP'); } catch(err) { request = null; }
}
if(request == null && typeof window.XMLHttpRequest != 'undefined')
{
try { request = new XMLHttpRequest(); } catch(err) { request = null; }
}
return request;
},
</code>
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
