Wait Message in ajax request

来源:互联网 发布:艾瑞泽5变速箱优化了吗 编辑:程序博客网 时间:2024/05/03 10:56

Hi,

How can i add wait message in ajax request.
I used the waitMsg config option , but is not showing the wait message while submitting the data.

How can i add the wait message while submitting the data using the Ext.Ajx.request

Please help me

this is my code

Code:
Ext.Ajax.request({                                    url        :    'submit.htm',                                    waitMsg    :    'Processing your request',                                    params    :    {                                                    emailId       :   'abc@cde.com'                                    },                                    success    :    respFunc,                                    failure    :    respFunc                        });respFunc = function(response){                                                var resText            =    Ext.decode(response.responseText);                                                                alert("response: " + resText            );                                                        }


 

You could use:

Code:
var box = Ext.MessageBox.wait('Please wait while I do something or other', 'Performing Actions');

just before your request, then after you receive a response (success or otherwise) hide the wait box:

Code:
box.hide();