Solution that changes based on checkbox state: var chap7 = document.getElementById(‘chap7’), post = document.getElementById(‘post’), printed = document.getElementById(‘printed’); printed.addEventListener(‘change’, function() { var quantity = parseInt(chap7.value, 10); post.value = printed.checked ? quantity * 3.5 : quantity; }, false); chap7.addEventListener(‘change’, function() { post.value = parseInt(this.value, 10); }); <p> <label for=”hours”>Learn JavaScript the Hardy Way’ – Complete e-book (Printed)</label> … Read more