Reputation: 18805
I've got a dijit select menu and I'm trying to insert new options dynamically. From inside the widget which generates the select menu I tried the following but it didn't work;
this.selectMenu.domNode.innerHTML = options
this.selectMenu
is the attach-point and options
is the html for the options I'd like to insert
The code above replaces the entire select menu, rather than insert the options
Many thanks in advance
Upvotes: 5
Views: 7159
Reputation: 18805
dijit.byId("selectmenu").addOption({disabled:false,label:'label',selected:true,value:1});
Upvotes: 8