I have an issue where I'm trying to execute a search query from a textbox and attempting to use enter to initiate the search; however, it doesn't seem to be working. I'm wondering if vb.net/asp.net is doing a postback or something that I'm not aware of.
ASPX Page
<form class="navbar-search">
<input id="searchbox" type="text" class="search-query span3" placeholder="Search" />
<div class="icon-search"></div>
</form>
JQuery
$('#searchbox').keyup(function (e) {
//alert("this will execute");
if (e.which == 13) {
alert("this will not execute");
//window.location.href = "http://www.google.com/";
}
});
I can't get the alert box to execute or the change location to work... if anyone can help I appreciate it.