So I am a newbie at JS and am trying to force this submit button to redirect to a specific page on our website. I have tested out the following code (below) which works on JSFiddle, but when I add the same JS to the live site it's not working.
Any help here is greatly appreciated!
<button id="btnSubmit" class="float-left submit-button" value="3">Home</button>
document.getElementById("btnSubmit").onclick = function() {window.location.href = "https://moralesgroup.net/";
};