Button fill color using popupmenu javascript
Hi - I have a button on a form which will change color based on a selection from a pop up menu activated by clicking the button. So, click the button, select one of the 5 options and depending on the option selected the entire button will fill with a set color.
I have been able to create the pop up menu as I need it, but I cannot get the resulting action (color change) to work. New to this so would appreciate your help getting the final piece to work. Thanks.
var c = {
'Home':['1,0,0'],
'Motor':['0,176/255,80/255'],
'Marine':['84/255,141/255,212/255'],
'Commercial':['246/255,132/255,38/255'],
'Home Essentials':['1,128/255,1'],
}
var n = new Array('Type of loss:');
for (var i in c) n.push(i);
var result = app.popUpMenu(n);
if (result) {
this.fillColor = ["RGB",c[result]];
}
