I got this error because of this line:
<button type="button" id="button" onclick="Continue(); document.body.style.cursor = "wait"; this.disabled = true;"> Continue </button>
Note the double-quotes around wait. Changing the double-quotes around wait to single-quotes fixed it.