View Full Version : Showing cancel button over mask

15 May 2012, 5:54 PM
Hi All,

When ever I make an ajax request, we show mask and display a message that data is loading. I want to show a cancel button in the mask. We need this to cancle the running request. Please provide your suggestion and code snippets.

Thank you.

20 May 2012, 3:59 AM
Use Ext.MessageBox.show();

This will allow you to show a window that has a cancel button.

29 May 2012, 6:32 PM
Hey Jay,

Thank you for the reply. Can you please provide some code snippet for it. I am not sure how to acheieve it.

29 May 2012, 11:12 PM
Hi webfriend,

You can show confirm/alert box before making ajax request, if user click yes button then make ajax call if cancel nothing happen for example -

loadData : function(params){
Ext.Msg.confirm('Load record', 'Are you want load record ?', function(answer){
if(answer == 'yes'){
}, this);

30 May 2012, 1:33 AM
Hi Sword-IT,

Thank you for your reply. But I want to provide user with ability to cancel a running request. With this implementation I cannot achieve the same. The idea is to show mask with a cancel buton and if user clicks on cancel, I will cancel the ajax request.

Thank you once again for quick reply.