I added a console.log(totPrice) line right before the setInnerHtml line, and then the console began throwing errors around line 11.
- It’s not getElementByName, its getElementsByName:
But once that’s fixed, you still get NaN for the radio value, because
2. Getting the value of a selected radio button is a bit more complex:
Adding to what themagicbean has already posted; here are some links to relevant W3 topics MDN page.
As for the input at the bottom not calculating as you intended. You should have a closer look at what attribute the input element displays.