Dev, Thanks again for your reply and your help. I still get no data to show in the combobox. Argh!!! Sorry, I'm pretty new at the extJS stuff.
extJS Code:
Code:
<script>
Ext.form.VTypes['nameVal'] = /^[A-Z][A-Za-z\-] + [A-Z][A-Za-z\-]*$/;
Ext.form.VTypes['nameMask'] = /[A-Za-z\-]/;
Ext.form.VTypes['nameText'] = 'Invalid Director Name';
Ext.form.VTypes['name'] = function(v) {
return Ext.form.VTypes['nameVal'].test(v);
}
Ext.onReady(function() {
Ext.QuickTips.init();
var genres = new Ext.data.Store({
url: 'genre.cfm',
reader: new Ext.data.ArrayReader({
fields: ['ID', 'GENRE_NAME'],
root: 'DATA',
idIndex: 0
}),
autoLoad: true
});
var movie_form = new Ext.FormPanel ({
url: 'movie-form-submit.cfm',
renderTo: document.body,
frame: true,
title: 'Movie Information Form',
width: 250,
items: [{
xtype: 'textfield',
fieldLabel: 'Title',
name: 'title',
allowBlank: false
},
{
xtype: 'textfield',
fieldLabel: 'Director',
name: 'director',
vtype: 'alpha'
},
{
xtype: 'datefield',
fieldLabel: 'Released',
name: 'released',
disabledDays: [1,2,3,4,5]
},
{
xtype: 'radio',
fieldLabel: 'Filmed In',
name: 'filmed_in',
boxLabel: 'Color'
},
{
xtype: 'radio',
hideLabel: false,
labelSeparator: '',
name: 'filmed_in',
boxLabel: 'Black & White'
},
{
xtype: 'checkbox',
fieldLabel: 'Bad Movie',
name: 'bad_movie'
},
{
xtype: 'combo',
name: 'genre',
fieldLabel: 'Genre',
mode: 'local',
store: genres,
displayField: 'GENRE_NAME',
valueField: 'ID',
width: 120
}
]
});
});
</script>
Data from genre.cfm
Code:
{"COLUMNS":["ID","GENRE_NAME"],"DATA":[[1,"Comedy"],[2,"Drama"],[3,"Horror"],[4,"Action"],[5,"Mystery"]]}