Select: get('value') doesn't work twice after using set('value',newValue) on dijit.form.Select
I have a method that first retrieves the current value of a dijit.form.Select using get(). Then, I change the selected value using set(). Later, that function is called again and the get() value is the old one even though the Select element has changed its value and displayed value.
function changeSelectedValue(){
var value = dijit.byID('selectElementID').get('value');
var newValue = anotherValidValue;
dijit.byID('selectElementID').set('value',newValue);
}
changeSelectedValue(); //This changes successfully the selected value.
//...some code here.
changeSelectedValue(); //This retrieves the old value instead of the new value.
Change History (3)
Summary: |
get('value') doesn't work twice after using set('value',newValue) on dijit.form.Select →
Select: get('value') doesn't work twice after using set('value',newValue) on dijit.form.Select
|
Resolution: |
→ worksforme
|
Status: |
new →
closed
|
Component: |
Dijit →
Dijit - Form
|
You'll need to attach a full (but small) self contained test case, thanks.