I am very new to Javascript.. I would like the search box to be on my
home page however I would like the results to display on a different
page... Could someone show me how I can do this with my current code ?
<script language="JavaScript" type="text/javascript">
<!--
function OnLoad() {
// Create a search control
var searchControl = new GSearchControl();
// site restricted web search with custom label
var siteSearch = new GwebSearch();
siteSearch.setLinkTarget(GwebSearch.LINK_TARGET_SELF);
siteSearch.setUserDefinedLabel("Search SBSB");
siteSearch.setUserDefinedClassSuffix("siteSearch");
siteSearch.setSiteRestriction("sbsb.com");
searchControl.addSearcher(siteSearch);
// tell the searcher to draw itself and tell it where to
attach
searchControl.draw(document.getElementById("searchcontrol"));
// execute an inital search
searchControl.execute();
}
//]]>
//-->
</script>
Thank you so much
Gina
--
You received this message because you are subscribed to the Google Groups
"Google AJAX APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en.