Bug Tracker

Modify

Ticket #6197 (closed bug: invalid)

Opened 3 years ago

Last modified 14 months ago

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);

xhr.send( type === "POST"
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

PropertySearch.html Download (25.3 KB) - added by buurd 3 years ago.
html with embedded javascript
getSearchableProperties Download (4.6 KB) - added by buurd 3 years ago.
JSON

Change History

comment:1 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to invalid

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.

Changed 3 years ago by buurd

html with embedded javascript

Changed 3 years ago by buurd

JSON

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:3 Changed 3 years ago by snover

  • Milestone 1.4.3 deleted

Resetting milestone to future.

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...

comment:6 Changed 2 years ago by rwaldron

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.