1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    53
    Vote Rating
    1
    varmaj80 is on a distinguished road

      0  

    Default Unanswered: How to add cancel option to a splashscreen

    Hello All,

    I have a search screen and when I click the search button, I will have a splash screen coming with the following message.
    var splash = Ext.getBody().mask('Retrieving data..This may take a few moments..', 'splashscreen');
    Ext.suspendLayouts();

    I would like to know if there is a way I can add a cancel option to this message so that when a user clicks on that cancel option, the whole search should stop. In case the user feels that the search is taking too long, he/she will click on that cancel option and the search will stop.

    Is there a way to do this. Thanks in advance....

  2. #2
    Touch Premium Member
    Join Date
    Mar 2011
    Posts
    198
    Vote Rating
    30
    Answers
    20
    chamacs has a spectacular aura about chamacs has a spectacular aura about

      0  

    Default

    Instead of using a Mask, you could use an Ext.MessageBox.show({...}) to emulate the 'Retrieving data..This may take a few moments..' . And only put a Cancel button on the modal box.

    Although, I'm not sure you can cancel an ajax server request.

  3. #3
    Sencha User lumberjack's Avatar
    Join Date
    Nov 2014
    Location
    Kansas
    Posts
    775
    Vote Rating
    32
    Answers
    101
    lumberjack has a spectacular aura about lumberjack has a spectacular aura about

      0  

    Default

    Ajax requests can be aborted by using the Ext.Ajax.abort() method.

    Below is a fiddle demonstrating some example usage.

    Regards,
    Brian


Thread Participants: 2

Tags for this Thread