How can I validate checkboxes in a table against the following conditions?

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

this may seem niggling, but to me it speaks to a serious usability problem on the web. If you need to explain how to use your page with a whole separate set of instructions (which you would in this case, or else have to explain why the user's choice is not validating, or else just leave it to them to figure out for themselves) then you've already lost. Nobody reads instructions. They check boxes, click buttons, see what happens and if it's not what they expect, maybe they investigate why not.

My idea is that it's your job as designer to make the page as intuitive as possible - it's not the user's job to try and figure out what it was that you were thinking when you made the page.

this may seem niggling, but to me it speaks to a serious usability problem on the web. If you need to explain how to use your page with a whole separate set of instructions (which you would in this case, or else have to explain why the user's choice is not validating, or else just leave it to them to figure out for themselves) then you've already lost. Nobody reads instructions. They check boxes, click buttons, see what happens and if it's not what they expect, maybe they investigate why not.

My idea is that it's your job as designer to make the page as intuitive as possible - it's not the user's job to try and figure out what it was that you were thinking when you made the page.

I can provide both options such as 08:00 AM - 09:00 AM and 08:30 AM - 09:30 AM but if a user selects both options then 08:30 is a duplicate time here.

another pet hate of mine: forms that let you do things and then, on "validation" tell you that what you've done isn't allowed.

If you're not allowed to pick two timeslots in a row, don't let them. Here's a jQuery solution - obviously it can be done in vanilla js, I'm just feeling lazy and quite like jQuery for traversing the DOM cross-browser...

nice idea on the +1, -1 routine, by the way - for completeness' sake, here's the jQuery version of that (again, no need to check for null elements, which makes me suspect that my whole "collection" explanation is a little off)