Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/09/2010, 22:29
dachury
 
Fecha de Ingreso: agosto-2009
Mensajes: 13
Antigüedad: 14 años, 8 meses
Puntos: 0
no funciona formulario ayuda!!

ola quiero mostrar el problema que tengo para ver si alguien me puede ayudar estoy utilizando javascript para un formularo con Extjs y pues hago el formulario y todo pero pues no me muestra nada alguien me puede guiar o decir porque

este es el codigo

Código PHP:
<html>
    <
head>
        <
meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      
        <
link rel="stylesheet" type="text/css" href="ext-3.2.1/resources/css/ext-all.css" />
<
link rel="stylesheet" type="text/css" href="resources/style.css" />

<
script type="text/javascript" src="ext-3.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-3.2.1/ext-all.js"></script>

<script type="text/javascript">
   var form = new Ext.FormPanel({
   labelWidth : 70,
   url : 'pagina.php',//1
        defaults : {
                xtype : 'textfield'//2
        },
   items : [
           {
                 fieldLabel : 'nombre',
                 id : 'nombre' //3
            }, {
                 fieldLabel : 'apellido',
                 id : 'apellido'
            }],
   fbar : [{//4
      xtype : 'button', iconCls: 'guardar', tooltip: 'Guardar los datos',
      handler : function(){
         form.getForm().submit({
            method : 'POST',
            params : {operacion : 'agregar'},//5
            waitTitle : 'Conectando',
            waitMsg : 'Enviando datos...',
            success : function(){//6
                    win.close();
                    var store = Ext.getCmp('grilla').getStore();
                    store.reload();
                  },
             failure : function(form, action){//7
                 if (action.failureType == 'server'){
                  respuesta = Ext.util.JSON.decode(action.response.responseText);
                   Ext.MessageBox.show({
                     title : 'Error',
                     msg : respuesta.errors.razon,
                     buttons : Ext.MessageBox.OK,
                    icon : Ext.MessageBox.ERROR
                    });
                   } else {
                   Ext.MessageBox.show({
                       title : 'Error',
                       msg : 'Faltan datos!',
                       buttons : Ext.MessageBox.OK,
                       icon : Ext.MessageBox.ERROR
                    });
                   }
                  }
                });
                }
           }]
});

var win = new Ext.Window({
   title : 'agregar',
   iconCls : 'icono',
   layout : 'fit',
   width : 280,
   height : 120,
   closable : true,
   resizable : false,
   border : true,
   modal : true,
   constrain : true,
   items : form
});

</script>

    </head>
    <body>
       
    </body>
</html>