Login Register

Setting and retrieving values from Combobox

hi friends,
how to get and set values in a combobox.
my pgm is;
var options = new dojo.data.ItemFileWriteStore({data : {identifier : 'index', items : []}});
var combo = new dijit.form.ComboBox({
store : options,
style : 'width: 150px',
onChange : checkFunction
});
options.newItem({name : '-select Option-', index : 0});

Now how can I get the options from the combo store...
I can do the newItem for setting. But I want to check out whether the same item is there or not...

plz respond... its urgent...

thanks in advance.

fetchItemByIdentity

Maybe you can try store.fetchItemByIdentity, if it founds the index of the new item then it means that it's already on the store.