Long form: scrolling to a missing checkbox/radio button?

Long form: scrolling to a missing checkbox/radio button?

I'm very new to js but am quite familiar with sql, html, php.  

I have a form that's quite lengthy.  I would like the form to validate in such a way that then user is automatically scrolled to a question with a missing response (and perhaps the box is highlighted with an error message).  I've seen a number of people doing this with textboxes, but haven't been able to find a neat way of doing things with radios/checkboxes.