I know this question was answered before, here: javascript:void(0) or onclick="return false" for <a> - which is better?
However, the solution did not work for me.
Here's the applicable code:
HTML:
<a id="Skip">Skip</a>
Javascript:
var Skip = document.getElementById("Skip");
Skip.addEventListener('click', reloadPage(), true);
function reloadPage() {
window.location.href = "play.php";
}
When I click on "Skip," nothing happens. I would like to keep the window.location.href
method of reloading as I'd like to add $_GET variables to it.