PDA

View Full Version : Form Loading Mask problem



ladro1987
29 Nov 2010, 8:46 AM
Hi all,
I have this error when I try to activate a loading mask on a my form:

this.el is undefined
this.el.mask(o.waitMsg, 'x-mask-loading');

This error arrives when i set "waitMsgTarget: true".

How it's possible this error?:-?

griffiti93
30 Nov 2010, 2:14 PM
Can you post a larger portion of your code for review? Be sure your FormPanel has rendered.

ladro1987
1 Dec 2010, 1:36 AM
This is the grid's button code that take the id from the grid and sand the id to a page php for the DataStore loading



iconCls:'edit',
id:'update_messaggio',
text: 'Modifica Messaggio',
handler: function(){
var m = grid_messaggi.getSelectionModel().getSelections();
if(m.length == 1){
Ext.getCmp('form_agg_message').getForm().load({
url:'action.php?act=GET_FORM&id_messaggio='+ m[0].get('id_messaggio'),
waitMsg:'Attendere Prego...'
});
win_agg_message.show();
}
}

This is the form code


/* FORM INTO A WINDOW*/
win_agg_message = new Ext.Window({
y:50,
title: 'Aggiornamento Messaggio',
width: 600,
height:500,
closable:true,
closeAction: 'hide',
items:[{
xtype: 'form',
frame:true,
autoWidth:true,
autoHeight:true,
id:'form_agg_message',
monitorValid:true,
url: "response.php",
waitMsgTarget: false, //->If i set true return the error
reader: new Ext.data.JsonReader ({
root: 'root',
totalProperty: 'totalCount',
id: 'id_messaggio',
fields: [
{name: 'id_messaggio', type: 'int'},
{name: 'categoria', type: 'string', convert: function(v){return Ext.util.Format.htmlDecode(v);}},
..............
]
}),
padding:10,
items: [
cmbox_categorie_agg,
{
xtype: 'hidden',
name: 'id_messaggio'
},{
. . . . . .
}]
}],
buttons: [{
text:'Salva ed Esci',
scale:'medium',
tooltip:'Salva il messaggio ed esci',
tooltipType: 'qtip',
iconCls:'salva',
formBind: true,
handler: function () {
Ext.getCmp('form_agg_message').getForm().submit({
method:'POST',
waitMsg: 'Salvataggio...',
success: function () {
......
},//success
failure:function(form_insert_news, action){
......
}
});
}
}]
});

This code works perfectly if the "waitMsgTarget: false". If i set this parameter to true return that error!

Thanks for the responce.
Roberto.