amedeoviscido
7 Mar 2008, 7:14 AM
Hi, I have this little bit of code:
var frmPratiche = new Ext.FormPanel({
width: 350,
height: 100,
frame: true,
labelWidth: 150,
bodyStyle:'padding:5px 5px 5px',
defaults: {width: 150},
defaultType: 'textfield',
items: [{
fieldLabel: 'Numero telefonico',
name: "numero_pratica",
value: "TEST ME",
allowBlank:false
}],
buttons: [{
text: 'Visualizza pratica',
handler: function() {
var val = frmPratiche.getForm().getEl("numero_pratica").getValue();
var win = new Ext.Window({
title:'Dettagli lavorazione ' + val,
width:500,
height:500,
closeAction:'close',
plain: false,
buttons: [{
text: 'Chiudi',
handler: function(){
win.close();
}
}]
});
loadPage(win, "dati.php",{telef_code:val});
win.show();
}
}]
});
At this point of the code there is my problem:
var val = frmPratiche.getForm().getEl("numero_pratica").getValue(false);
"val" is always undefined. Why???
var frmPratiche = new Ext.FormPanel({
width: 350,
height: 100,
frame: true,
labelWidth: 150,
bodyStyle:'padding:5px 5px 5px',
defaults: {width: 150},
defaultType: 'textfield',
items: [{
fieldLabel: 'Numero telefonico',
name: "numero_pratica",
value: "TEST ME",
allowBlank:false
}],
buttons: [{
text: 'Visualizza pratica',
handler: function() {
var val = frmPratiche.getForm().getEl("numero_pratica").getValue();
var win = new Ext.Window({
title:'Dettagli lavorazione ' + val,
width:500,
height:500,
closeAction:'close',
plain: false,
buttons: [{
text: 'Chiudi',
handler: function(){
win.close();
}
}]
});
loadPage(win, "dati.php",{telef_code:val});
win.show();
}
}]
});
At this point of the code there is my problem:
var val = frmPratiche.getForm().getEl("numero_pratica").getValue(false);
"val" is always undefined. Why???