It's basically simple when you use Ajaxpro.
var msg = useclass.method (argument). Value;
because the background response is slow, a "loading" is added, and then the Ajaxpro is called later
Load loading$ ("#load"). Show ();//ajaxvar msg = useclass.method (argument). value;//Hide Load <pre name= "code" class= " JavaScript ">$ (" #load "). Hide ();
as a result, the whole performance is not what you want. This time, and will not appear loading.
On the web, this is the synchronous invocation of Ajaxpro, and Ajaxpro does provide an asynchronous approach.
Load loading$ ("#load"). Show ();//ajaxuseclass.method (argument,function (data) {if (data.error! = null) {//Hide load $ ("#load "). Hide (); var msg = Data.value;}});
full thought this will solve the problem, but the load of small icons turn ah turn, small heart is not good!!
As you can see in the browser, the page load has timed out. 10s
You can only set the time-out.
$ (document). Ready (function () {//Set the premise is ajaxpro already exists, preferably after pageload set ajaxpro.timeoutperiod = 100000; Ajaxpro.ontimeout = function () {alert ("Oops I went, timed out!!! ");}});
the problem is solved here.
Ajaxpro implementation of asynchronous calls to solve the browser suspended animation and timeout problems