this.form = new Ext.FormPanel({
width: 300,
height: 105,
url: 'manejador.php',
method: 'POST',
border: false,
renderTo: 'formulario',
bodyStyle: 'padding: 10px; background-color: #c9ced9',
items: [ {xtype: 'textfield', fieldLabel: 'Texto', name: 'text', allowBlank: false} ]
});
function save (){
this.form.getForm().submit({
succes: function ( form, action ){
Ext.Msg.alert('Succes');
},
failure: function ( form, action ) {
Ext.Msg.alert('Failed');
}
});
}
/* Msg */
if (mysql_affected_rows($link) == -1){
$info = array('success' => false, 'msg' => 'Fallo la query SQL.');
}else if( mysql_affected_rows($link) > 1){
$info = array('success' => false, 'msg' => 'El alta se efectuó, pero generó datos duplicados!.');
}else if( mysql_affected_rows($link) == 0){
$info = array('success' => false,'msg' => 'Fallo el alta, pero la query se ejecutó.');
}else if (mysql_affected_rows($link) == 1){
$info = array('success' => true, 'msg' => 'El alta se ejecutó correctamente.' );
}
echo json_encode($info);
It looks like you're new here. If you want to get involved, click one of these buttons!
The content of this site is copyrighted by Quizzpot.com, it is prohibited to publish our tutorials on other blogs, magazines or any other media without prior permission.
Copyright © 2012 Quizzpot.
Our visitors are mostly developers and Web designers, advertise with us, you only need to contact us .