There are 3 radio buttons (2008, 2011, 2014) and a Next button. Can someone help me write some javascript code so I can determine when the Next button is clicked, that a radio button was selected and if so which value was it? I would like to use the values 2008, 2011, or 2014. Thank you.
<div class="modal-answer-block five ng-binding ng-scope"
ng-repeat="option in vm.vars.q1options track by $index"> <input
type="radio" id="q1-a0" name="q1-a0" ng-value="5"
ng-model="vm.vars.q1selected" class="ng-pristine ng-valid ng-empty
ng-touched" value="5"> <br> <br> 2008 </div> <div
class="modal-answer-block five ng-binding ng-scope" ng-repeat="option
in vm.vars.q1options track by $index"> <input type="radio" id="q1-a1"
name="q1-a1" ng-value="4" ng-model="vm.vars.q1selected"
class="ng-pristine ng-valid ng-empty ng-touched" value="4"> <br> <br>
2011 </div> <div class="modal-answer-block five ng-binding ng-scope"
ng-repeat="option in vm.vars.q1options track by $index"> <input
type="radio" id="q1-a2" name="q1-a2" ng-value="3"
ng-model="vm.vars.q1selected" class="ng-pristine ng-valid ng-empty
ng-touched" value="3"> <br> <br> 2014 </div> <button
class="modal-next" ng-click="savePanel($event, 1);">NEXT</button>