I have a Master table (Person ID, Name etc,) and a Detail table for entering that person's payments for various items. So on a page I have the master record and a details table with multiple rows for entering payments. I have a drop down list for selecting the purchased item and want to detect the selection and fill in the Payment Due in the second field.
The cell id of the first row for the selected item is #x1_PaymentCategory and I want to calculate and populate #x1_PaymentDue for the payment due (not a simple lookup). I can use the $("#x1_PaymentCategory").change function to process the selection for first row, but don't want to have to write the same procedure for the second row #x2_PaymentCategory, and the third row #x3_PaymentCategory and so on.
Is there are way to write a generic procedure or function to detect a change to the PaymentCategory cell in any row and process it accordingly?