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


  • 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.


  • any one???







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about hi i kind new in this this my question its about forms , Please add it free.

    7 January 2009 | cameltoepants.com | edit