
I have a table as follows: <table> <tr><td><input type="text" name="attr_upgr1" /><input type='checkbox' name='attr_up1'/></td></tr> <tr><td><input type="text" name="attr_upgr2" /><input type='checkbox' name='attr_up2'/></td></tr> <tr><td><input type="text" name="attr_upgr3" /><input type='checkbox' name='attr_up3'/></td></tr> <tr><td><input type="text" name="attr_upgr4" /><input type='checkbox' name='attr_up4'/></td></tr> <tr><td><input type="text" name="attr_upgr5" /><input type='checkbox' name='attr_up5'/></td></tr> </table> What I want to do is have a master switch (e.g. checkbox) that controls the displaying of the rows. In one setting it should display all rows, but in the other setting it should only display rows in which the associated checkbox is ticked. E.g. If up2 and up3 are ticked but the others are not then the display will show, depending upon the master switch, either all five rows or just those two. How doable is this?