click event in form problem
Hi all,
I have this simle form:
<html>
<head>
<title></title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#Search_Button").click(function(){ window.location = 'http://www.google.com'; return false; });
});
</script>
</head>
<body>
<form id="aspnetForm" method="get" action="http://www.times.com">
<input id="Search_Button" type="image" /><br />
<input id="UserName" type="text"/>
<input id="Text1" type="submit"/>
</form>
</body>
</html>
When I press enter at "UserName" input then Search_Button click event is raised. Expected event is submit with action="http://www.times.com". Can anyone tell me what I doing wrong ?
Thanks