Login Register

Refill a Combobox

Hi everybody,

my english is not so good, and i dont know the words to find my answer by seachring.

I use a combobox and try to refill it.

I Create a Combobox and fill it with data. I have to change this Data dynamicly.

<select style="width:200px" dojoType="combobox" name="location2" id="location2" widgetId="location2">
<option value="test">test</option>
</select>

now i want to change the data..
e.g.

<option value="foo">foo</option>
<option value="bar">bar</option>

how can i do that?

i found this

var options = new dojo.data.ItemFileWriteStore({data: {identifier: 'name', items:[]}});
options.newItem({name: 'foo'});
options.newItem({name: 'bar'});

but i get this error: "dojo.data.ItemFileWriteStore is not a constructor"

thanks
regards
markus