-
-
Save krabello/78117d8112f85023e1a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class=searchBox> | |
<img onclick=moduleSearch('<?php catalog();?>'); src=images/026cc599.search_icon.png alt=Search> | |
<input id="filter_keyword" placeholder=Keyword/Item#> | |
</div> | |
<script> | |
<!-- | |
$('#filter_keyword').keydown(function(e) { | |
if (e.keyCode == 13) { | |
moduleSearch('<?php echo $url?>'); | |
} | |
}).focus(function() { | |
if ($(this).val() == 'Keyword/Item#') { | |
$(this).val(''); | |
} | |
}); | |
function moduleSearch(url) { | |
var searchTerm = document.getElementById('filter_keyword').value; | |
if (searchTerm === "") { | |
return false; | |
} | |
var searchLocation = url + 'index.php?route=product/search&keyword=' + encodeURIComponent(searchTerm); | |
window.location = searchLocation; | |
} | |
//--> | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment