Hello Everyone,
I have chosen to use Google Custom Search with my website and was given the following code, my question is, how can i pass a search query from my homepage which has a standard form on there to the search page which holds this code?
I am given a search box within this code but would prefer to use my own on the homepage...
Thanks
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function() {
var customSearchControl = new google.search.CustomSearchControl('001427157132748787903:rmvstkwg_s4');
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> <style type="text/css">
.gsc-control-cse {
font-family: Verdana, sans-serif;
border-color: #070707;
background-color: #070707;
}
input.gsc-input {
border-color: #2A2A2A;
}
input.gsc-search-button {
border-color: #63D03B;
background-color: #37831C;
}
.gsc-tabHeader.gsc-tabhInactive {
border-color: #E9E9E9;
background-color: #E9E9E9;
}
.gsc-tabHeader.gsc-tabhActive {
border-top-color: #FF9900;
border-left-color: #E9E9E9;
border-right-color: #E9E9E9;
background-color: #37831C;
}
.gsc-tabsArea {
border-color: #E9E9E9;
}
.gsc-webResult.gsc-result {
border-color: #070707;
background-color: #070707;
}
.gsc-webResult.gsc-result:hover {
border-color: #070707;
background-color: #070707;
}
.gs-webResult.gs-result a.gs-title:link,
.gs-webResult.gs-result a.gs-title:link b {
color: #237F03;
}
.gs-webResult.gs-result a.gs-title:visited,
.gs-webResult.gs-result a.gs-title:visited b {
color: #237F03;
}
.gs-webResult.gs-result a.gs-title:hover,
.gs-webResult.gs-result a.gs-title:hover b {
color: #FFFFFF;
}
.gs-webResult.gs-result a.gs-title:active,
.gs-webResult.gs-result a.gs-title:active b {
color: #237F03;
}
.gsc-cursor-page {
color: #237F03;
}
a.gsc-trailing-more-results:link {
color: #237F03;
}
.gs-webResult .gs-snippet {
color: #FFFFFF;
}
.gs-webResult div.gs-visibleUrl {
color: #237F03;
}
.gs-webResult div.gs-visibleUrl-short {
color: #237F03;
}
.gs-webResult div.gs-visibleUrl-short {
display: none;
}
.gs-webResult div.gs-visibleUrl-long {
display: block;
}
.gsc-cursor-box {
border-color: #070707;
}
.gsc-results .gsc-cursor-page {
border-color: #E9E9E9;
background-color: #070707;
}
.gsc-results .gsc-cursor-page.gsc-cursor-current-page {
border-color: #FF9900;
background-color: #37831C;
}
.gs-promotion {
border-color: #336699;
background-color: #FFFFFF;
}
.gs-promotion a.gs-title:link,
.gs-promotion a.gs-title:link *,
.gs-promotion .gs-snippet a:link {
color: #237F03;
}
.gs-promotion a.gs-title:visited,
.gs-promotion a.gs-title:visited *,
.gs-promotion .gs-snippet a:visited {
color: #237F03;
}
.gs-promotion a.gs-title:hover,
.gs-promotion a.gs-title:hover *,
.gs-promotion .gs-snippet a:hover {
color: #FFFFFF;
}
.gs-promotion a.gs-title:active,
.gs-promotion a.gs-title:active *,
.gs-promotion .gs-snippet a:active {
color: #237F03;
}
.gs-promotion .gs-snippet,
.gs-promotion .gs-title .gs-promotion-title-right,
.gs-promotion .gs-title .gs-promotion-title-right * {
color: #FFFFFF;
}
.gs-promotion .gs-visibleUrl,
.gs-promotion .gs-visibleUrl-short {
color: #237F03;
}
</style>