Tuesday, November 20, 2007

Setting the color of a picklist option

//get the field
var list = crmForm.all.prioritycode;

var option = list.options[0]; //select the option to be coloured
option.style.backgroundColor = "#FF0000"; //Set the background color to red.
option.style.color = "#FFFFFF"; //Set the text color to white.

No comments: