Skip to main content
Participant
November 17, 2017
Question

exit events

  • November 17, 2017
  • 1 reply
  • 1543 views

I have the following in LiveCycle  and the fill color changes on selection but not until you click back onto the drop down list and goes back to silver once you click out of the drop down list.   I need the fill color to remain once the value has been selected.    Can anyone help?

form1.#subform[0].DropDownList1[1]::exit - (JavaScript, client)

var vName = this.somExpression; 

var fieldObj = xfa.resolveNode(vName + ".ui.#choiceList.border.fill.color");  

if (this.rawValue == "H") { 

     fieldObj.value = "254,10,10"; 

else if (this.rawValue == "M") { 

     fieldObj.value = "251,248,7"; 

else if (this.rawValue == "L") { 

     fieldObj.value = "60,241,8"; 

else { 

     fieldObj.value = "253,254,254"; 

This topic has been closed for replies.

1 reply

sinious
Legend
November 20, 2017

Did you already have a look at this answer here:

Change background color on a Drop down list based on the value

Participant
November 20, 2017

The preserve scripting changes is marked that’s what I don’t understand. As the user you make the selection tab or click out and you don’t see the color fill till you click back on the drop down box. And then if you tab or click out of it again the fill color goes back to the standard colors it doesn’t stay. What I’m trying to do is essentially make what will look like a heat map from users selections on the form. I am also very very new to java script and Livecycle.

Kim Weist