bhomass
24 Oct 2007, 3:35 PM
shouldn't the follow code load myform?
var stateCombo = 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
})
var dobDate = new Ext.form.DateField( {
fieldLabel : 'Date of Birth',
name : 'dob',
//width : 190,
allowBlank : false
})
var emailText = new Ext.form.TextField( {
allowBlank : false,
fieldLabel : 'Email',
name : 'email',
vtype : 'email',
width : 190
})
var myform = new Ext.form.BasicForm(
'hello-form',
{}
// labelAlign: 'right',
// url:'/localhost:8080/extjs-examples/submit'
);
myform.add(
stateCombo,
emailText,
dobDate
);
myform.load({url:'http://localhost:8080/extjs-examples/ajax'});
the POST was completed, the returned data look good, but form elements are not loaded.
var stateCombo = 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
})
var dobDate = new Ext.form.DateField( {
fieldLabel : 'Date of Birth',
name : 'dob',
//width : 190,
allowBlank : false
})
var emailText = new Ext.form.TextField( {
allowBlank : false,
fieldLabel : 'Email',
name : 'email',
vtype : 'email',
width : 190
})
var myform = new Ext.form.BasicForm(
'hello-form',
{}
// labelAlign: 'right',
// url:'/localhost:8080/extjs-examples/submit'
);
myform.add(
stateCombo,
emailText,
dobDate
);
myform.load({url:'http://localhost:8080/extjs-examples/ajax'});
the POST was completed, the returned data look good, but form elements are not loaded.