I have a website made in ASP.NET MVC3 with the Razor rendering view. Within this site I create charts (System.Web.UI.DataVisualization.Charting.Chart) and serve them as images with a controller to my view.
It can take anywhere from 1 to 5 seconds to load the charts. Therefore, I wish to show a loading modal dialog to give some feedback to the user.
Creating a jQuery UI dialog is very simple and I have heard of solutions with a timed closing. Yet, a time delayed close is not a proper solution in my case because the of the time variation.
Is it possible to show a single loading dialog until every image on a page is loaded and rendered by a browser? How could I do this?
Thank you! 🙂
If you have Separate URL for each image that you can load via jQuery you can hook into the load event and when it’s done hide the wait image. Would this approach work for you? If so I’ll edit and add code.