The following homepage component passes the value from an HTML input to a URL, using the value as the filter criteria for 3 separate parameter values. Everything works fine, except it doesn't submit when I hit enter! I have to manually click the button. Anyone have any idea how to make the jscript function run on Enter as well as onclick. P.S. I've already tried replacing onclick with onsubmit - no dice. It just refreshes the page rather than redirecting to the intended URL.
<script type="text/javascript">
function accountSearch() {
var userInput = document.getElementById('pv0').value;
window.location.href ='/00Oe0000000FRlj?pv0='+userInput+'&pv1='+userInput+'&pv2='+userInput;
}
</script>
<form onsubmit="accountSearch();">
Account Name:<input type="text" name="pv0" id="pv0"> <br>
<input type="button" onclick="accountSearch();" value="Submit">
</form>