Foros del Web » Programando para Internet » Javascript » Frameworks JS »

no funciona formulario ayuda!!

Estas en el tema de no funciona formulario ayuda!! en el foro de Frameworks JS en Foros del Web. 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 ...
  #1 (permalink)  
Antiguo 18/09/2010, 22:29
 
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> 
  #2 (permalink)  
Antiguo 19/09/2010, 01:28
Avatar de caricatos
Moderador
 
Fecha de Ingreso: abril-2002
Ubicación: Torremolinos (Málaga)
Mensajes: 19.607
Antigüedad: 22 años
Puntos: 1284
Tema movido desde javascript
__________________
Por favor:
No hagan preguntas de temas de foros en mensajes privados... no las respondo
  #3 (permalink)  
Antiguo 22/09/2010, 10:10
Avatar de mayid
Colaborador
 
Fecha de Ingreso: marzo-2009
Ubicación: BsAs
Mensajes: 4.014
Antigüedad: 15 años
Puntos: 101
Respuesta: no funciona formulario ayuda!!

El explorer te da algun error? O el Firebug?

Etiquetas: formulario
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:42.