Bug Tracker

Modify

Ticket #5292 (closed bug: invalid)

Opened 4 years ago

Last modified 14 months ago

Ajax Async Request fails in IE8

Reported by: JVisser Owned by:
Priority: critical Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocking: Blocked by:

Description

Hi, i have a problem with a ajax call.

This method is giving me headaches.

jQuery("#" + loader).show();

jQuery.ajax({

type: "POST", url: adresXpressUrl, dataType: "json", async: false, cache: true, data: { postcode: postcode, housenumber: housenumber, RequestVerificationToken: getAntiForgeryToken() }, success: function(data) {

var html = ""; if (data.status > 0) {

document.getElementById(streetFieldId).value = data.street; document.getElementById(townFieldId).value = data.town.toLowerCase().capitalize(); document.getElementById(countryFieldId).value = "NL"; html = addressSingleLine(postcode, housenumber, housenumberSuffix, data.street, data.town); submit = true;

} else {

document.getElementById(streetFieldId).value = null; document.getElementById(townFieldId).value = null; html = "<input type=\"hidden\" value=\"true\" name=\"invalid\" /><span class=\"field-validation-error\">Message</span>";

} $(updateDiv).update(html); jQuery("#" + loader).hide();

}

});

Because the method async is it keeps giving me an empty result set. If i set async to true then i can perform the method and i get the correct value.

This problem only occures in IE8 on XP SP3. FF3.5/Safari/IE6/IE7 can execute this code without any problem.

Any help is welcome.

Best Regards, Joris Visser

Change History

comment:1 Changed 4 years ago by dmethvin

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

The code you have isn't a complete test case. It would be best to try and debug this on the forums (for example see if  cache:false helps), and reopen this ticket with a complete and minimal test case if the problem is still there.

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.