Ticket #6197 (closed bug: invalid)
Ajax is not working in IE8 but working in firefox
| Reported by: | Ran | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | ajax | Version: | 1.4.2 |
| Keywords: | IE Firefox browser error | Cc: | |
| Blocking: | Blocked by: |
Description
Version: 1.4.2 I am trying to fire an Ajax call and the code works in firefox but failed in IE8(I didn't try IE7 or previous version). I used all the possible method like $.get, $.ajax,jQuery.post,$.getJSON, but all the same. I traced into the js file and add an alert at line 5260. "alert(e)". It tells me that the XMLHttpRequest can not be send before open method. I debuged backward and found the open method been called in both browers. It's very strange for me. So I gave this temporary solution: add another open before send The code like this: try { xhr.open(type, s.url, s.async);
| type === "PUT" | type === "DELETE" ? s.data : null ); |
} catch(e) { jQuery.handleError(s, xhr, null, e); Fire the complete handlers alert(e); complete(); } Hope there will be another good solution or someone can tell me why I am failed here?That would be very appreciated! Thanks!
Attachments
Change History
comment:2 Changed 3 years ago by buurd
- Status changed from closed to reopened
- Resolution invalid deleted
I have the same problem. The call works in Firefox and Chrome but not in IE8. When trying to debug the problem, the only thing I manage to find out is that the callback doesn't occur.
Se function loadPropertiesFromSettings in order to modify the html-file to suite your setup.
comment:4 Changed 3 years ago by snover
- Priority set to undecided
- Status changed from reopened to closed
- Resolution set to invalid
No valid testcase still.
comment:5 Changed 2 years ago by jquery@…
We had the same problem. It was caused by sarissa (0.9.9.3, used by Java Richfaces), which overrides window.XMLHttpRequest in IE8:
function(){if(!_SARISSA_XMLHTTP_PROGID){_SARISSA_XMLHTTP_PROGID=Sarissa.pickRecentProgID(["Msxml2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"]);}
return new ActiveXObject(_SARISSA_XMLHTTP_PROGID);}
jQuery (1.4.2) then uses "jQuery.ajaxSettings.xhr = function() { return new window.XMLHttpRequest()};", which somehow causes the mentioned problems...
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.


If you have a more-complete test case I would definitely appreciate it - it's a bit hard to determine what may be going wrong with these details. Please re-open if you have a test case that we may view.