Dropdown menu in different colors
Hi,
Being a beginner at Javascript and have been looking and searching for the right code.
I really hope that you can help me.
I have created a fillable PDF with a dropdown menus. The dropdowns have 4 options and want each option to result in a color.
This is the script I currently have been working on and saw that a similair problem somewhere, but their where no problems there.
Script:
event.value=this.getField("Dropdown93").value;
if (event.value=="W1")
event.target.fillColor = color.red;
else if (event.value=="W2")
event.target.fillColor = color.orange;
else if (event.value=="W3")
event.target.fillColor = color.yellow;
else if (event.value=="(leeg)")
event.target.fillColor = color.transparent;
else
event.target.fillColor = color.transparent;
The dropdownboxes and background colors (of the boxes) are all red and do not change color. It doesn't matter which result I pick. It stays red. Something is wrong, but do not know what.
I will be very greatfull if someone could help me with this.
Thank you very much!
Arti
