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

      0  

    Default Unanswered: How to add cancel option to a splashscreen

    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
    178
    Vote Rating
    20
    Answers
    18
    chamacs will become famous soon enough chamacs will become famous soon enough

      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
    774
    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

    [SIGPIC][/SIGPIC]

    Are you a Sencha products veteran who has wondered what it might be like to work at Sencha? If so, please reach out to our recruiting manager: sheryl@sencha.com

Thread Participants: 2

Tags for this Thread