Background – I have a web application for which a request takes several seconds.
Question – How could I display a “waiting” type indicator (e.g. spinner) to the user after they initiate the request, until the actual HTTP request response comes back from the server?
Notes – I’m assuming this to be a generic web development question, however my web application is a “Ruby on Rails” application.
thanks
Typically, you’d add a new DOM object (or show an existing one) to the page, potentially via jQuery or some other library, that displays the spinner, and then in whatever callback is fired when the AJAX request completes; you’d have hide the spinner object again.