I am trying to implement a page loader using an ordinary overlay with a gif image when user clicks submit button. The submit button will perform a asp.net postback and then redirects to another page. That page might perform a postback to do some data retrieval.
Currently, the page loader will disappear when the redirected page displays as the page is still performing some data retrievals.
How can I persist the page loader to display until the redirected page loads completely?
Currently, I use this code to display loader
$('form').on('submit', function(){showLoader()});