Reputation: 1960
I have a onChange event that should trigger the update of an input field. Here 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);
}
I've verified that I'm passing a valid value but I'm still unable to update the value for my input element. Any idea what I'm missing?
Upvotes: 0
Views: 1375
Reputation: 15673
Update method is typically used to replace inner html of the element. perhaps you can just set the value of the buildInfo element by Ext.get("buildInfo").value = value .
Honestly though I have never seen extjs used in this way :)
Upvotes: 2