1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default Unanswered: form submit waitMsg

    Unanswered: form submit waitMsg


    How do you pop some feedback during the ajax call

    tried
    Code:
    form.submit({
    			waitMsg: 'publication...',
    	    url: 'publish.php'
          success: function(elt, response) {
            console.log(response);
            Ext.Msg.alert("Donnée publiée");
          },
          failure: function(elt, response) {
          	console.log(response);
          	Ext.Msg.alert("Donnée non publiée", response.description);
          }
    		});
    but nothing happens

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,327
    Answers
    3540
    Vote Rating
    850
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The waitMsg doesn't go in the option object, it's an argument

    Screen Shot 2012-03-23 at 12.06.36 PM.jpg
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default


    I tried this also: but did not work

    Code:
    form.submit({
            url: 'publish.php',
          success: function(elt, response) {
            console.log(response);
            Ext.Msg.alert("Donnée publiée");
          },
          failure: function(elt, response) {
              console.log(response);
              Ext.Msg.alert("Donnée non publiée", response.description);
          }
            },null,null,null,'publication...');
    with 0, 2 or 3 'null,'

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default


    Hi
    I didn't succeed to have any message or mask during form submission, please help

  5. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    253
    Vote Rating
    0
    ci11111 is on a distinguished road

      0  

    Default


    I'm doing like this, there must be something better, but could not make waitMsg work...

    Code:
    Ext.Viewport.setMasked({ xtype: 'loadmask', message: 'Recherche...' });
    form.submit(
                    {
                        url : 'find.php',
                        success : function(elt, response) {
                            Ext.Viewport.setMasked(false);
                            //...
                        },
                        failure : function(elt, response) {
                            Ext.Viewport.setMasked(false);
                            Ext.Msg.alert("Aucun",
                                    response.description);
                        }
                    }
                    );

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Posts
    1
    Vote Rating
    0
    vandzungn is on a distinguished road

      0  

    Default


    Quote Originally Posted by ci11111 View Post
    I'm doing like this, there must be something better, but could not make waitMsg work...

    Code:
    Ext.Viewport.setMasked({ xtype: 'loadmask', message: 'Recherche...' });
    form.submit(
                    {
                        url : 'find.php',
                        success : function(elt, response) {
                            Ext.Viewport.setMasked(false);
                            //...
                        },
                        failure : function(elt, response) {
                            Ext.Viewport.setMasked(false);
                            Ext.Msg.alert("Aucun",
                                    response.description);
                        }
                    }
                    );
    In order to use Ext.Viewport, you can use like that :
    Code:
    form.submit({
    // .... waitMsg: { xtype:'loadmask', message:'Processing...' }, //...

    In Form.Panel code, it call setMasked(options.waitMsg) directly

Thread Participants: 2