i want to add a loading or spinner message until the form/server has finished reloading how do i check and know that form has finished loading to disable the spinner?
NOTE: once the form is submitted the updated data is not available until the server restart only the form heading is visible, while the restart and changes are updated. Currently i am manually refreshing the page until form is available again.
here is my html and jquery snippet and loading code . My loading code is not working.
Code for loading message
$(document).ready(function() {
$('<div id="loading">Loading...</div>')
.insertBefore('#myform')
.ajaxStart(function() {
$(this).show();
}).ajaxStop(function() {
$(this).hide();
});
});