Skip to main content

Bug Tracker

Side navigation

#5292 closed bug (invalid)

Opened September 25, 2009 03:36PM UTC

Closed November 18, 2009 02:08AM UTC

Last modified March 15, 2012 12:02PM UTC

Ajax Async Request fails in IE8

Reported by: JVisser Owned by:
Priority: critical Milestone: 1.4
Component: ajax Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
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

Attachments (0)
Change History (1)

Changed November 18, 2009 02:08AM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

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.