PDA

View Full Version : Displaying fade over message in a DIV once the form submitted



swiftguy121
25 Dec 2007, 12:26 AM
Hello Experts,

Im pretty impressed with 'extjs', in the process of learning the fundas. I could reach a stage where I can create a simple form + Ajax submission. Now I want to extend the functionality where in I want to show a fade over message in a DIV once the form is submitted. what could be the possible form proerites,methods to be used to accomplish this?

Please help me out, Thanks in advance.

Following is the code of the form.

form.js

Ext.onReady(function(){

var reader = new Ext.data.XmlReader({
record : 'record',
success: '@success'
}, [
{name: 'first', mapping:'first'},
{name: 'last', mapping:'last'}
]);

var silForm = new Ext.FormPanel({
frame: true,
renderTo: 'form-ct',
labelWidth: 150,
waitMsgTarget: true,
reader: reader,
items:[{
xtype: 'fieldset',
title: 'Personal Details',
autoHeight: true,
collapsible: true,
defaultType: 'textfield',
draggable: false,


items: [
{
fieldLabel: 'First Name',
name: 'first',
width:190,
allowBlank:false
}, {
fieldLabel: 'Last Name',
name: 'last',
width:190,
allowBlank:false
}, {
fieldLabel: 'Address ',
name: 'Address',
width:190,
allowBlank:false
}, {
fieldLabel: 'Email',
name: 'Email',
vtype: 'email',
vtypeText: 'invalid id',
width: 190,
allowBlank: false
},
new Ext.form.DateField({
fieldLabel: 'Date of Birth',
name: 'dob',
width:190,
allowBlank:false
}),

new Ext.form.ComboBox({
fieldLabel: 'State',
hiddenName:'state',
store: new Ext.data.SimpleStore({
fields: ['abbr', 'state'],
data : Ext.exampledata.states
}),
valueField:'abbr',
displayField:'state',
typeAhead: true,
mode: 'local',
triggerAction: 'all',
emptyText:'Select a state...',
selectOnFocus:true,
width:190
}),
]
}],

buttons:[{
text: 'Submit',
handler: function()
{
silForm.getForm().submit({url:'saveData.php',waitMsg:'Submitting Data'});



}
}]
});

});