I have a basic Easyui combobox where i need to add dynamic options based on some condition. My Html :
<input id="org_type" name="org_type" class="easyui-combobox" data-options="required: true,valueField:'value',textField:'text',prompt:'Select Org Type'" style="width:100%;" >
Now i need to load some options based on some conditions. for example :
if(level == 1){
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
}else{
<option value="vw">Volvo</option>
<option value="audi">Saab</option>
}
Though that's not the right approach i know. I need actually something like this.
Finally i got my own solution. Simply i added these JavaScript code when i need to add options dynamically.
}
And it work's fine for me. Thanks.