Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/05/2013, 08:12
ambichol
 
Fecha de Ingreso: febrero-2013
Ubicación: Lima
Mensajes: 301
Antigüedad: 11 años, 2 meses
Puntos: 5
Problemas con Formulario de Registro

Hola, que tal, tengo un formulario de registro que funciona sin problemas en el Firefox y el Chrome, sin embargo, cuando lo ejecuto en IE no ejecuta correctamente, es decir se queda pensando pero si ingresa los valores a la BD mas no muestra el mensaje de confirmacion.

les comparto el codigo, esperando me puedan apoyar.
Código Javascript:
Ver original
  1. Ext.onReady(function(){
  2.  
  3. Ext.QuickTips.init();
  4.  
  5. // turn on validation errors beside the field globally
  6. Ext.form.Field.prototype.msgTarget = 'side';
  7.  
  8. var simple = new Ext.FormPanel({
  9.     frame: true,
  10.     title:'Registrar Usuario',
  11.     width:380,
  12.     autoHeight:true,
  13.     url:'save-form.php',
  14.     waitMsgTarget: true,
  15.     monitorValid:true,
  16.     items:[{
  17.         labelAlign: 'left',
  18.         labelWidth: 125,
  19.             items: [
  20.                 new Ext.form.FieldSet({
  21.                 title: 'Detalles de Registro',
  22.                 autoHeight: true,
  23.                 defaultType: 'textfield',
  24.                     items: [{
  25.                         fieldLabel: 'User',
  26.                         name: 'user',
  27.                         width:90,
  28.                         allowBlank:false
  29.                     },{
  30.                         fieldLabel: 'Password',
  31.                         name: 'passwd',
  32.                         inputType:'password',
  33.                         width:90,
  34.                         allowBlank:false
  35.                     },{
  36.                         fieldLabel: 'Area',
  37.                         name: 'area',
  38.                         width:190,
  39.                         allowBlank:false
  40.                     },{
  41.                         fieldLabel: 'Nombre',
  42.                         name: 'nombre',
  43.                         width:190,
  44.                         allowBlank:false
  45.                     },{
  46.                         fieldLabel: 'Ap. Paterno',
  47.                         name: 'apellidop',
  48.                         width:190,
  49.                         allowBlank:false
  50.                     },{
  51.                         fieldLabel: 'Ap. Materno',
  52.                         name: 'apellidom',
  53.                         width:190,
  54.                         allowBlank:false
  55.                     },{
  56.                         fieldLabel: 'Oficina',
  57.                         name: 'oficina',
  58.                         width:190,
  59.                         allowBlank:false
  60.                     },{
  61.                         fieldLabel: 'Referencia',
  62.                         name: 'referencia',
  63.                         width:190,
  64.                         allowBlank:false
  65.                     },
  66.                     new Ext.form.ComboBox({
  67.                         fieldLabel: 'Tipo',
  68.                         name:'tipo',
  69.                             store: new Ext.data.ArrayStore({
  70.                             fields: ['numero', 'detalle'],
  71.                             data : [
  72.                                 ['1','ADMIN'],
  73.                                 ['2','USER']
  74.                                 ]
  75.                             }),
  76.                         valueField:'numero',
  77.                         displayField:'detalle',
  78.                         typeAhead: true,
  79.                         mode: 'local',
  80.                         triggerAction: 'all',
  81.                         emptyText:'Elija el Tipo de Usuario...',
  82.                         selectOnFocus:true,
  83.                         width:190,
  84.                         allowBlank:false
  85.                     }),
  86.                     {
  87.                         fieldLabel: 'E-mail',
  88.                         name: 'email',
  89.                         vtype:'email',
  90.                         width:190,
  91.                         allowBlank:false
  92.                     }]
  93.                 })
  94.                 ]
  95.         }],
  96.     buttons: [{
  97.         text: 'Registrar',
  98.         formBind: true,
  99.         // Function that fires when user clicks the button
  100.         handler:function(){
  101.         simple.getForm().submit({
  102.             method:'POST',
  103.             waitTitle:'Conectando',
  104.             waitMsg:'Enviando Data...',
  105.             success:function(){
  106.                 Ext.Msg.alert('Exito', 'Registro Exitoso!', function(btn, text){
  107.                     if (btn == 'ok'){
  108.                         var redirect = 'index.php'; //url luego de registrar usuario
  109.                         window.location = redirect;
  110.                     }
  111.                 });
  112.             },
  113.             failure:function(form, action){
  114.                 if(action.failureType == 'server'){
  115.                     obj = Ext.util.JSON.decode(action.response.responseText);
  116.                     Ext.Msg.alert('Registro Fallido!', obj.errors.reason);
  117.                 }else{
  118.                     Ext.Msg.alert('Error!', 'Autenticacion con el Servidor Rechazada : ' + action.response.responseText);
  119.                 }
  120.                 simple.getForm().reset();
  121.             }
  122.         });
  123.         }
  124.  
  125.     },{
  126.         text: 'Cancelar',
  127.         handler: function(){
  128.             Ext.Msg.alert('Advertencia', 'Esta Seguro de Eliminar los Datos Ingresados?', function(btn, text){
  129.                 if (btn == 'ok'){
  130.                     simple.getForm().reset();
  131.                 }
  132.             });
  133.         }
  134.     }]
  135.     });
  136.  
  137. simple.render('mant');
  138.  
  139. });