1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    8
    Vote Rating
    0
    4lenour is on a distinguished road

      0  

    Default Unanswered: SUBMIT FORM NOT SEND EMPTY/NULL PARAMETER

    Unanswered: SUBMIT FORM NOT SEND EMPTY/NULL PARAMETER


    Dear All

    a few day i was search "HOW TO SUBMIT FORM SEND EMPTY/NULL PARAMETER" and i am try all suggestion from forum answer about this, but did'tn work.

    i found this url http://www.sencha.com/forum/showthre...ull-parameters but did'tn work to, can any body to help me?

    this is my code :

    Code:
    form.submit({
        method:'POST',        
        submitEmptyText: true,
        waitTitle:'Connecting',
        waitMsg:'Please wait for sending data ...',
        waitMsgTarget:true,    
        success: function(form, action) {
           form.reset();
           Ext.getCmp('dataGrid').getStore().load();
        },
        failure: function(form, action) {                                                     
            switch (action.failureType) {
                case Ext.form.action.Action.CLIENT_INVALID:
                    Ext.Msg.alert('Failure', 'Form fields may not be submitted with invalid values');
                    break;
                case Ext.form.action.Action.SERVER_INVALID:
                    Ext.Msg.alert('Failure', action.result.msg);
                    break;
                default:                                                             
                    switch(action.response.status)
                    {
                        case 401:
                            window.document.location.href=ifoBaseURL;    
                        break;
                        case 200:                                                                                
                            Ext.Msg.alert('Failure', obj.msg);     
                        break;
                        default:
                            Ext.Msg.alert(action.response.statusText, action.response.responseText);    
                    } 
            }
        }
    });

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    436
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    This form sends the blank value:

    Code:
    new Ext.form.Panel({
        renderTo : document.body,
        title    : 'Test',
        url      : 'data/form.php',
        items    : [
            {
                xtype      : 'textfield',
                fieldLabel : 'Foo',
                name       : 'foo',
                value      : 'bar'
            },
            {
                xtype      : 'textfield',
                fieldLabel : 'Blank Value',
                name       : 'blank'
            },
            {
                xtype   : 'button',
                text    : 'Submit',
                handler : function (button) {
                    var form = button.up('form');
    
                    form.submit();
                }
            }
        ]
    });
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    8
    Vote Rating
    0
    4lenour is on a distinguished road

      0  

    Default


    mitchellsimoens your suggest not work to, i am using extjs 4.2 beta and i am create app using MVC extjs

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,714
    Vote Rating
    436
    Answers
    3113
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    Like I said, for me it sends the value:

    Screen Shot 2013-03-06 at 8.18.39 AM.png

    Tested on 4.1.3 and 4.2.0.489
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    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 almost in print!

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