SyntaxFix
Write A Post
Hire A Developer
Questions
I simplification for Science_Fiction's answer I think is to use the exclusive or function so you can just have:
if(checkbox1.checked ^ checkbox2.checked) { //do stuff }
That is assuming you want to do the same thing for both situations.