title: Google CSE - search box that redirects to the page with results
body: <p>guys.</p>
  
  <p>I'm a bit confused with Google CSE manual and can't understand some of its basic functionality.</p>
  
  <p>So, I have created a free custom search profile and all I got is the only code snippet, this one:</p>
  
  <pre><code>&lt;div id="cse" style="width: 100%;"&gt;Loading&lt;/div&gt;
  &lt;script src="http://www.google.com/jsapi" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt; 
    google.load('search', '1', {language : 'ru', style : google.loader.themes.V2_DEFAULT});
    google.setOnLoadCallback(function() {
      var customSearchOptions = {};
      var googleAnalyticsOptions = {};
      googleAnalyticsOptions['queryParameter'] = 'q';
      googleAnalyticsOptions['categoryParameter'] = '';
      customSearchOptions['googleAnalyticsOptions'] = googleAnalyticsOptions;  var customSearchControl = new google.search.CustomSearchControl(
        '001098741616107095995:xeqdxoqdue8', customSearchOptions);
      customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
      customSearchControl.draw('cse');
    }, true);
  &lt;/script&gt;
  </code></pre>
  
  <p>This snippet creates the google custom search controls in the specified div. That's why this snippet is probably going to be situated in the search results page, e. g. www.site.com/search.html</p>
  
  <p>But what I'm going to implement is the search box in the sidebar on every page of my website. User can type-in the search query into that search box wherever he is and get straight to the result page www.site.com/search.html with the set of matches awaiting him.</p>
  
  <p>How can I do that?</p>
  
  <p>Looking through the manual has no effect for me, I'm missing something, but can't figure out what exactly...
  Thanks!</p>