Expand my Community achievements bar.

Getting the rawValue of a Drop-Down list on the "change" event

Avatar

Former Community Member
I am having problems getting the rawValue of a Drop-Down list on the "change" event. It seems that you have to select the same item twice in a row to get the rawValue to be the value of the selected item.



::dropdownlist onChange event::

xfa.host.messageBox(this.rawValue);



On the first time a value is selected you get 'null'. The second time the same value is selected, you get the selected value.



Does anyone have any thoughts on why this is happening? Also, I CANNOT use xfa.event.newText, I need to use the rawValue of the dropdownlist.



Thanks
2 Replies

Avatar

Former Community Member
The change event occurs before the rawValue is changed. If you NEED to use the rawValue you'll need to use a later event. Perhaps you could use exit so that it gets triggered when the field loses focus?



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Great explanation... that figures why.



Thanks!