Detecting when a combo box field in a table's column change

Detecting when a combo box field in a table's column change

Hi I have a table where one of its colums whose name is 'color' is a combo box ,the combo box displays two values 'black', 'white';  what I need is to update a counter each time the user changes de value of any combo box on any row of the table from 'black' to 'white', if  the initial value of a combo is 'white' and it changes to 'black', counter must be incresed other way decresed. How can I do it ?, I would like to use the id attribute of the field to do that.

I have done that in a simple combo box, but no in those that belongs to tables

Any help will be greatly appreciated  !

TIA,

Jose