Created
March 13, 2012 19:22
-
-
Save kepford/2030905 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
<script type="text/javascript"> | |
google.load('search', '0', {language : 'en'}); | |
google.setOnLoadCallback(function() { | |
var customSearchControl = new google.search.CustomSearchControl('012175768895571244741:5zxvz8g5isy'); | |
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET); | |
var options = new google.search.DrawOptions(); | |
options.setAutoComplete(true); | |
customSearchControl.draw('cse', options); | |
//$(".gsc-input").val("<?php echo $_POST['as_q']; ?>");//insert into search field requested search text | |
//$('.gsc-input').focus();//give search box focus | |
customSearchControl.execute('<?php echo $_POST['as_q']; ?>'); | |
//$(".gsc-search-button").click();//call button click event, show results | |
}, true); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment