开发者

Mootools: How to stop browser from freezing when Request is sent

i am developing an application. On a form submit i am sending a request to server using Request class in mootools. but when i click on submit button it freezes browser, till the response comes from server.

The ResponseText is sent to a custom function responseProcessor() for processing on it.

The Request Object is like:

 req = new Request({
    async: true, method: 'post',
    onSuccess: function(html) { responseProcessor(); },
    onFailure: function() { alert('Page Loading Failed ....!!'); },
 });
 req.send({url: "js/jsCode.php"});

I cant figure out why browser is freezing while Reque开发者_如何学Gost takes place?


your request is synchronous, so the browser will freeze until the request completes.

set async: true to resolve this

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜