susurs
29 Nov 2007, 4:03 PM
Hi!
Almost banging my head for few hours without success :(
Whay I am getting the error(Firebug) after pressing the 'talak' button:
simple.isValid is not a function
Using just an example code snippet it isn't working :( Using latest buid of extjs
code below:
var simple = new Ext.FormPanel({
labelWidth: 75, // label settings here cascade unless overridden
url:'save-form.php',
frame:true,
title: 'Simple Form',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank:false
},{
fieldLabel: 'Last Name',
name: 'last'
},{
fieldLabel: 'Company',
name: 'company'
}, {
fieldLabel: 'Email',
name: 'email',
vtype:'email'
}, new Ext.form.TimeField({
fieldLabel: 'Time',
name: 'time',
minValue: '8:00am',
maxValue: '6:00pm'
})
],
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
simple.addButton('talak', function(){
if(simple.isValid()) {
Ext.MessageBox.alert('Info', 'All OK.');
}else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}, simple);
simple.render(document.body);
Almost banging my head for few hours without success :(
Whay I am getting the error(Firebug) after pressing the 'talak' button:
simple.isValid is not a function
Using just an example code snippet it isn't working :( Using latest buid of extjs
code below:
var simple = new Ext.FormPanel({
labelWidth: 75, // label settings here cascade unless overridden
url:'save-form.php',
frame:true,
title: 'Simple Form',
bodyStyle:'padding:5px 5px 0',
width: 350,
defaults: {width: 230},
defaultType: 'textfield',
items: [{
fieldLabel: 'First Name',
name: 'first',
allowBlank:false
},{
fieldLabel: 'Last Name',
name: 'last'
},{
fieldLabel: 'Company',
name: 'company'
}, {
fieldLabel: 'Email',
name: 'email',
vtype:'email'
}, new Ext.form.TimeField({
fieldLabel: 'Time',
name: 'time',
minValue: '8:00am',
maxValue: '6:00pm'
})
],
buttons: [{
text: 'Save'
},{
text: 'Cancel'
}]
});
simple.addButton('talak', function(){
if(simple.isValid()) {
Ext.MessageBox.alert('Info', 'All OK.');
}else{
Ext.MessageBox.alert('Errors', 'Please fix the errors noted.');
}
}, simple);
simple.render(document.body);