1. #1
    Ext User
    Join Date
    Jun 2007
    Posts
    98
    Vote Rating
    0
    ajaxE is on a distinguished road

      0  

    Default How to position WaitMsg

    How to position WaitMsg


    I am using WaitMsg at form submission. How to position WaitMsg box in top? It always goes pretty low portion of a screen, I have to scroll to see it.

    Code:
    form_instance_create.submit({
    		method: 'POST',
    		waitMsg:'Send message and upate state...',
    		reset: false,
    		params: {send: 'yes'},
                    ...
    								
    });
    Thanks for your help!

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    See if this works. The 20 in the alignTo call is the vertical offset from the form element's center-top, adjust as needed:
    Code:
    form_instance_create.submit({
         method: 'POST',
         waitMsg:'Send message and upate state...',
         reset: false,
         params: {send: 'yes'},
         ...				
    });
    
    var el = form_instance_create.getEl();
    el.child('.x-mask-loading').alignTo(el, 't-t', [0,20]);

  3. #3
    Ext User
    Join Date
    Jun 2007
    Posts
    98
    Vote Rating
    0
    ajaxE is on a distinguished road

      0  

    Default


    Thanks Brian for your quick reply!

    It compilaned that
    var el = form_instance_create.getEl(); is not a function.

    I must have defined my form wrong so this el is not working? If you have any inside, please let me know. form_instance_create is visible within the scope.

    Thanks for your help!

  4. #4
    Sencha User
    Join Date
    Apr 2012
    Location
    Austin, Texas
    Posts
    2
    Vote Rating
    0
    brian.moeskau is an unknown quantity at this point

      0  

    Default


    I assumed that form_instance_create is a BasicForm. If it's a regular Ext.form.Form change it to form_instance_create.getForm(). If it's something else, then you'll have to figure out how to get to the underlying form.

Thread Participants: 1