It's something else to do on your page. The following code works as expected:
<html>
<body>
<button type="button" onclick="redirect()">Test!</button>
<script type="text/javascript">
function redirect() {
window.location.href='https://www.yahoo.com';
}
</script>
</body>
</html>
I would suggest opening the developer tools in your browser before you click the button and look in the console window for any messages that pop up.
My first suspect is whatever library you're using for that "StationExistsModel" object, whatever that is.