Add same onchange event to each input box and maintain one array... Update it to true at each box index (When 3 input boxes are there) and at-least 1 is filled save should get enabled One of the value in array is true then make save button enable The number of input boxes should be equal to values in array.. First all indexes false.. If user change some thing in one box update array at its index..