Adobe Acrobat Dropdown menu background colour issues
Hi guys,
I'm pretty new to Javascript. I just wanted to write a basic code so that when certain options are selected, the background will change colour. The issue that I'm having however is that when I select the option (eg. Critical), it will change colour (eg. red), but when I click off to select anywhere else in the page, it changes back to the default blue. I've selected "Commit selected value immediately" and my code is below. Help please!
if (event.value=="Critical")
event.target.fillColor = color.red;
else if (event.value=="High")
event.target.fillColor = ["RGB",1,0.5,0];
else if (event.value=="Medium")
event.target.fillColor = color.yellow;
else if (event.value=="Low")
event.target.fillColor = color.green;
else
event.target.fillColor = color.transparent;
