I have a c# MVC page (not that I think that matters to this question). When the page is loaded, it immediately makes an ajax call to a service that prepares a lot of information, and then loads it into the page. (whilst displaying a Loading Data Modal).
<script type="text/javascript">
$(document).ready(function () {
$('#loadingWebServiceData').modal({
backdrop: 'static',
keyboard: false,
show: true
});
$("#Summary").load("/Summary/GetAllSummaries",
function () {
$('#loadingWebServiceData').modal('hide');
});
});
</script>
This all works when the page is first hit. However, if I then select a record, and make some changes to it on a different view, then save the changes, the last code in my controller is;
return View("Index");
This returns me back to my original page, however the data hasn't been updated. Debugger and breakpoints show that when I return to the index page the document.ready doesn't fire.
So either there is something subtly wrong in what I am doing, or I have misunderstood document.ready.