"location = link.href;" not working

Hi guys,

I got this code inside a javascript function and it’s not working. How to make it working?


go_here = document.getElementById("go_here");

link = "welcome.php";

function GoToTheLink() {
	location = link.href;
}

go_here.addEventListener("click", function(event) {
	GoToTheLink();
});

And the HTML code is:


<button id=go_here>Go Here</button>

What I got is this:


http://localhost/project/home/undefined

Thanks

Never mind I got it.