#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: | |
Blocked by: | Blocking: |
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 (2)
Change History (8)
comment:1 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 13 years ago by
Resolution: | invalid |
---|---|
Status: | closed → reopened |
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 12 years ago by
Priority: | → undecided |
---|---|
Resolution: | → invalid |
Status: | reopened → closed |
No valid testcase still.
comment:5 Changed 12 years ago by
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...
comment:6 Changed 12 years ago by
There is still no valid test case here.
With regard to the evidence of conflict with a library that is overwriting XMLHttpRequest, jQuery is not accountable for the behaviour of 3rd party scripts.
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.