Its exacly the same as in my post above , Howard do you have anything to contribute to a solution to my question ??
if you are interested in the solution simply watch the thread and await replies from other people all you are doing now is simply polluting the thread with pointless replies which other people have to read through and will put them off providing a solution
Just to summarize you have the validation now working on all rows but you want it only working for rows where the descirption is Vacation or Sickness.
There are 2 ways to go about getting an element in the same row as the triggering element
1) By traversing first up to the nearest TR element and then to the element you want. Use jQuery for that.
2) Changing the element description to "Display only save state" The element now has an id just like the the triggering element.
The id of tabular form input elements consist of two parts the f array number and the rownumber FNN_XXXX.
You can get the id of the description field by splitting the id to get the rownumber and add that to the F array part of the discription field.
You probably would want a function returning true or false to use in the condition.
I have managed to get the validation to fire just on the first two columns by giving them an element_attribute class and then using that in the jquery selector instead of input , which was firing on all items
now to restrict it to rows
if i can get the ID as you mention in (2) then I can get the value of that element
column_1_id = 'f01_' + $(this.triggeringElement ).attr('id').substr(4);
and once I have the ID of the element in column 1of that row that has just been updated then I can get the value and check if its 'Vacation' or 'Sickness'
I don't totally understand your requirement. Is this validation to fire when ANY input item loses focus on the page? Ie the items in the tabular form and the abscense item? This would mean the validation would have to check every row in the tabular form currently displayed (and what if not all records are displayed, if this can happen?)
Or do you need a validation to fire after changing the item column 1 or 2, and when their value is larger than 0 and the description is vacaction or sickness, then give an alert?