default magento search work using hit enter key or submit button.but now i need this search work only for pressing submit button and not work for hit enter key.For this am added the below js code in form.mini.phtml file
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery("#search_mini_form").bind("keypress", function(e) {
if (e.keyCode == 13) {
return false;
}
});
});
</script>
but this code is not working when there is the code for autocomplete
//<![CDATA[
var searchForm = new Varien.searchForm('search_mini_form', 'search', '');
searchForm.initAutocomplete('<?php echo $catalogSearchHelper->getSuggestUrl() ?>', 'search_autocomplete');
//]]>
By removing this autocomplete code the above code works correctly.But i need both codes work correctly(i need autocomplete property also).I am using magento 1.9.2.0