1. #1
    Sencha User
    Join Date
    Nov 2007
    Posts
    32
    Vote Rating
    0
    fastwings is on a distinguished road

      0  

    Red face hi i kind new in this this my question its about forms

    hi i kind new in this this my question its about forms


    ok its gose like this i build a complex form
    that go like this
    Code:
    var combo = new Ext.form.ComboBox({
                            fieldLabel: 'gender',
                            hiddenName:'gender',
                            store: new Ext.data.SimpleStore({
                                fields: ['gender', 'genderName'],
                                data : Ext.exampledata.gender // from states.js
                            }),
                            valueField:'gender',
                            displayField:'genderName',
                            typeAhead: false,
                            mode: 'local',
                            triggerAction: 'all',
                            emptyText:'Select a gender...',
                            selectOnFocus:true,
                            orceSelection:true,
                            editable:false,
                            width:190
                        });
    var login = new Ext.form.FormPanel({
        labelWidth: 75,
        title: 'Login to Bank',
        bodyStyle:'padding:15px',
        baseCls: 'x-plain',
        url:'save-form.php',
        width: 450,
        height:300,
        labelPad: 10, 
        items:[{
            xtype:'tabpanel',
                activeTab: 0,
                defaults:{autoHeight:true, bodyStyle:'padding:10px'}, 
                items:[{
                    title:'Login',
                    layout:'form',
                    defaultType: 'textfield',
                    items: [{
                        fieldLabel: 'UserName',
                        name: 'username',
                        allowBlank:false
                    },{
                        fieldLabel: 'Password',
                        inputType: 'password',
                        name: 'password',
                        allowBlank:false
                    }]
                   }]
          }] ,
                buttons: [{
                text: 'login'
            }]
    });
    var frm = new Ext.form.FormPanel({
        labelWidth: 125,
        title: 'Register Client',
        method: 'POST', 
        bodyStyle:'padding:15px',
        success:function(form, action){Ext.MessageBox.alert('Info3', action.result.results.test)},
        height:400,
        action:'servlet/Server.Register',
        frame:true,
        width: 350,
        labelPad: 10,
           items: {
                xtype:'tabpanel',
                activeTab: 0,
                defaults:{autoHeight:true, bodyStyle:'padding:10px'}, 
                items:[{
                    title:'Personal Details',
                    layout:'form',
                    defaultType: 'textfield',
    
                    items: [{
                        fieldLabel: 'First Name',
                        name: 'first',
                        allowBlank:false
                    },{
                        fieldLabel: 'Last Name',
                        name: 'last',
                        allowBlank:false
                    },{
                        fieldLabel: 'Company',
                        name: 'company'
                    },combo]
                },{
                    title:'User Details',
                    layout:'form',
                    defaults: {width: 150},
                    defaultType: 'textfield',
    
                    items: [{
                        fieldLabel: 'UserName',
                        name: 'user',
                        allowBlank:false
                    },{
                        fieldLabel: 'Password',
                        name: 'pass',
                        id: 'pass',
                       // validator: checkPasswords,
                        allowBlank:false
                    },{
                        fieldLabel: 'Password Conform',
                        name: 'pass_conf',
                        id: 'pass_conf',
                       // validator: checkPasswords,
                        allowBlank:false
                    }, {
                        fieldLabel: 'Email',
                        name: 'email',
                        vtype:'email',
                        allowBlank:false
                    }]
                },
                {
                    title:'Phone Numbers',
                    layout:'form',
                    defaults: {width: 150},
                    defaultType: 'textfield',
    
                    items: [{
                        fieldLabel: 'Home',
                        name: 'home',
                        allowBlank:false
                    },{
                        fieldLabel: 'Business',
                        name: 'business'
                    },{
                        fieldLabel: 'Mobile',
                        name: 'mobile',
                        allowBlank:false
                    },{
                        fieldLabel: 'Fax',
                        name: 'fax'
                    }]
                }]
            }
    });
    
    
    
     frm.addButton('Submit', function(){
                     text: 'Register',
                    frm.getForm().submit({
                        waitMsg:'Please Wait...',
                        success:function(form, action){
                            Ext.MessageBox.hide();
                            Ext.MessageBox.alert('Success', action.result.results.test);
                            window.location = "interface.php";
                        },
    
                        // callback handler if submit has failed
                        failure: function(form, action) {
                          Ext.MessageBox.hide();
                          Ext.MessageBox.alert('Failure', action.result.results.success);
                        },
                        //params : { login:'login' }  // I don't know what I'm suppose to do there
                    });
                }, frm);
    ok i have try many ways what i return is :
    {"results":[{"test":"username"}]}

    all i try to do get reaction from the from
    means after long way of the register from i try print if the server register him or not

    how i do at ???
    its dont work what i do i am out of ideas i have searched all the post for pasted 5 days about at
    i want
    plz help
    btw i got one more question its go like this if i want check its the textfiled on the fly have the same values how i do at
    cuz i have there the passworded places i want checked them about at
    thx in advance to all

  2. #2
    Sencha User
    Join Date
    Nov 2007
    Posts
    32
    Vote Rating
    0
    fastwings is on a distinguished road

      0  

    Question


    any one???

  3. #3
    Ext User
    Join Date
    Dec 2007
    Posts
    5
    Vote Rating
    0
    althulus is on a distinguished road

      0  

    Default


    Take a look at http://extjs.com/learn/Manual:Forms:Result_Format

    The return has to be in a particular format in-order for your success/failure function to register.

    btw. Using proper English + avoid using acronym will get you more help.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar