I’m just getting to grips with Jquery.
Issue: I want a user to be able to update information from a dynamically generated list by opening the detail in a fancybox for editing (hence I’m using .live with click). All works except if a user opens a fancybox and then updates information (it posts fine and updates the DB using the below) and then closes and reopens the fancybox window the dynamically generated content reloads unchanged. I guessing that the browser is caching the page. How, can I force the updated information be loaded on reopening the facnybox window?
Also, if you can advise if the below code could be improved.
$(document).ready(function() {
$("#UpdateLink").live('click', function() {
$('#txtHint1').fadeIn('fast').html('<img src="ajax-loader.gif" />');
var formData = $('#UpdateLinkForm').serialize();
$.ajax({
type: "POST",
url: "Link-Updater.asp",
data: formData,
success: function(d) {
$('#txtHint1').empty().html(d).delay(800).fadeOut('slow');
}
});
});
});
Thank you.
You could try disabling cache for AJAX calls: