Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/10/2010, 18:44
hicolu
 
Fecha de Ingreso: agosto-2009
Ubicación: Lima
Mensajes: 226
Antigüedad: 14 años, 8 meses
Puntos: 3
desabilitar boton en EXTjs

hola amix,tengo dos checks y cuando esten marcados los 2 checks quiero que en ese momento recien se habilite el boton como puedo hacer ???


//-- FORMULARIO DE APROBACION --//
function aprobar(){
var fisico = null;
var ppto = null;
if (fisicoCheck.getValue()){
fisico=1;
}else{
fisico=2;
}
if (pptoCheck.getValue()){
ppto=1;
}else{
ppto=2;
}

Ext.Ajax.request({
url: '<?=base_url()."index.php/modulo/mod43_accion";?>',
method: 'POST',
params: {
idMeta : <?=$idMeta?>,
comentario : comentario.getValue(),
fisico : fisico,
ppto: ppto
},
success: function (action,options){
var data=Ext.util.JSON.decode(action.responseText);
Ext.Msg.alert('Name', data.message, function(btn, text){
if (btn == 'ok' || btn=='yes'){
window.close();
}
});
}

});
}

var form = new Ext.FormPanel({
renderTo: 'form',
defaults:{xtype:'textfield'},
bodyStyle:'background: #E5E5E8;',
border:false,
width:700,
labelWidth:200,
labelAlign:'right',
items:[
fisicoCheck,
pptoCheck,
comentario
],
buttonAlign: 'center', //<--botones alineados a la derecha
buttons:[
{
text:'Aprobar metas',
id:'botonmetas',
disabled:true,

listeners : {
click: function(){
aprobar();
}
}
}
]
});

}
}

Ext.onReady(com.mod43.Form1.init,com.mod43.Form1);

GRACIAS