Note: This relates to a previous question.
I have a Wicket page that has a form with some complex client-side interactions that I decided to use jQuery for instead of Wicket (long discussion, I know). Essentially I'm just building a JSON object, submitting it via AJAX, and performing some action on completion. The call works fine in Firefox, but not in any version of IE. I've already verified that there are no extraneous commas. Here's the code:
var lookup = {
'name': name,
'description': description,
'items': [{
'name': itemName,
'value': itemValue
}]
};
$.ajax({
type: 'post',
url: '${callbackURL}', // This file is parsed by Wicket and receives a dynamic callback URL here. This is not jQuery!
cache: false,
data: {'lookup': JSON.stringify(lookup)},
contentType: 'application/json',
complete: function() {
alert('This never gets called in IE!')
}
});
Any suggestions? Thanks!
Update: It appears my problem is due to IE caching the resources. I've put no-cache code in my HTML file, but it seems that either the page is still getting cached (and by extension, the JS it references), or the JS file with my jQuery code in it is being cached with the old callback URL in it so that the server doesn't respond because there's nothing at that URL anymore. When I remove the pretty URLs everything works fine (because every time Wicket generates the URL, it's unique). Still, shouldn't the complete
function get called even if there's no server response?