Busy State Ajax Browser

We have an ajax request that takes approx. 30 seconds, and then sends the user to another page. During this time, of course, we show the ajaxy spinner indicator, but the browser may also appear stuck because the client browser does not actually work or does not show its own boot message.

Is there an easy way to tell all major browsers to look busy with the JS team?

Thanks Chad

+5
source share
3 answers

Do you need to use AJAX in this situation? Could you place / put on another page whose goal is to process the request and as soon as you finish redirecting to the landing page?

You can still use JS to pull out the counter, and since you are sending to another page, the browser will display its “busy indicator”. The browser should never show the middle page, as soon as the request is processed, the response is redirected to the destination.

+2
source

You can set the CSS property cursorvalue is bodythe value of "wait". With a prototype, it will look like this:

$(document.body).setStyle({cursor: 'wait'});

I believe this is jQuery code, someone please correct me if I am wrong, as I am not a jQuery expert:

$("body").css("cursor", "wait");

, Windows Mac OS.

+2

JQuery?

$('html').ajaxStart(function() { $('#busyindicator').show(); } );
$('html').ajaxStop(function() { $('#busyindicator').hide(); } );

But maybe I do not understand your question. What does it mean to look busy? Do you mean that the browser progress bar is active or the busy indicator is active? Do not think that you can do this ...

0
source

All Articles