Ext JS JavaScript DHTML



Hello World Window






Ext.onReady(function() {
    var myform = new Ext.FormPanel({ 
      url: 'your.php',
      renderTo: Ext.getBody(),
      frame: true,
      title: 'Title',
      width: 250,
      items: [
                {
            xtype: 'textfield',
            fieldLabel: 'Title',
            name: 'title',
            allowBlank: false
            }
        ],
            buttons: [
                {
            text: 'Save',
            handler: function(){
                        myform.getForm().submit({
                            success: function(f,a){
                                Ext.Msg.alert('Success', 'It worked');
                            },
                            failure: function(f,a){
                                if (a.failureType === Ext.form.Action.CONNECT_FAILURE){
                                
                                    Ext.Msg.alert('Failure', 'Server reported:'+a.response.status+' '+a.response.statusText);
                                }
                                if (a.failureType === Ext.form.Action.SERVER_INVALID){
                                    Ext.Msg.alert('Warning', a.result.errormsg);
                                }
                            }
                        });
            }
          }, 
          {
            text: 'Reset',
            handler: function(){
              myform.getForm().reset();
            }
          }
      ]
    });
});
 
asdf