I am trying to use an onChange event to update an input field with the selected option. Below is my code:
HTML:
<select id="builds" onchange="setBuild()">
<option value="select">Select</option>
...
</select>
<input type="text" id="buildInfo" name="buildInfo" style="margin-top:10px;" value=""/>
ExtJS:
function setBuild(){
var value = Ext.get("builds").dom.options[Ext.get("builds").dom.selectedIndex].text;
Ext.get("buildInfo").update(value);
}
Even though I am passing a valid value, the input element is not getting updated. Can someone help me identify what I am missing?