Hi all,

I am using Ext 4.0.7.
I need to add a combo-box in the toolbar. In ExtJS 1.1 it is done something like this:

filterBySelect = tb.addDom({
tag:'select', children: [
{tag: 'option', value:'rptNm', selected: 'true', html:'Report Number'},
{tag: 'option', value:'rptTitlTxt', html:'Report Title'},
{tag: 'option', value:'author', html:'Author'} ]
});

Where tb is Ext toolbar.
I want the same functionality in ExtJS 4.0.7
I found Ext.DomHelper and modified the code something like this:

tb=Ext.create('Ext.toolbar.Toolbar',{id:'tb'});
tb.add('Search Results By:');

var dh=Ext.domHelper;
var spec={
tag:'select', children: [
{tag: 'option', value:'rptNm', selected: 'true', html:'Report Number'},
{tag: 'option', value:'rptTitlTxt', html:'Report Title'},
{tag: 'option', value:'author', html:'Author'} ]
};
dh.append(tb, spec); // I am getting a javascript error at this line
'Undefined' is null or not an object

Please suggest a solution. Any other alternatives??

Thank you