on 08-29-2008 9:04 AM
Hi
I have a drop down list(DDL) control on my form. Im trying to read the selected value. I have put code on the change event. Strange enough, when the event is triggered it returns previous value in the rawValue attribute. I want to read the current value. If I use the same code in the calculate event, it works but returns an error that the validation has failed.
The code i am using is
if (this.rawValue != "No Damage") {
damage.presence = "visible";
}
else {
damage.presence = "hidden";
}
where damage is the name of a subform whose visibility is determined by the value in the DDL. Is there something i'm missing here?
Regards
Prince,
Just make sure you have selected the language as JavaScript and try your code in the exit event or else try code as shown below in change event as getting current value from drop-down is different from other controls.
xfa.host.messageBox("Current Value is " + xfa.event.change);
OR
xfa.host.messageBox("Current Value is " + xfa.event.newText);
Use anyone which works best for you.
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.