How to make a button redirect to another page using jQuery or just Javascript How to make a button redirect to another page using jQuery or just Javascript javascript javascript

How to make a button redirect to another page using jQuery or just Javascript


is this what you mean?

$('button selector').click(function(){   window.location.href='the_link_to_go_to.html';})


$('#someButton').click(function() {    window.location.href = '/some/new/page';    return false;});


Without script:

<form action="where-you-want-to-go"><input type="submit"></form>

Better yet, since you are just going somewhere, present the user with the standard interface for "just going somewhere":

<a href="where-you-want-to-go">ta da</a>

Although, the context sounds like "Simulate a normal search where the user submits a form", in which case the first option is the way to go.