Media-wiki:GoogleSearch/test: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
(Undo revision 58036 by Elifarley (talk))
No edit summary
 
Line 1: Line 1:
Test:
<html>
<html>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
<script type="text/javascript">  
   google.load('search', '1', {language : 'en'});
   google.load('search', '1', {language : 'en'});
   google.setOnLoadCallback(function() {
   google.setOnLoadCallback(function() {
     var customSearchOptions = {};
     var customSearchOptions = {};
 
     var imageSearchOptions = {};
     var imageSearchOptions = {};
     imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
     imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
     customSearchOptions['enableImageSearch'] = true;
     customSearchOptions['enableImageSearch'] = true;
     customSearchOptions['imageSearchOptions'] = imageSearchOptions;
     customSearchOptions['imageSearchOptions'] = imageSearchOptions;
 
 
    var customSearchControl = new google.search.CustomSearchControl(
var customSearchControl = new google.search.CustomSearchControl(
       '010823241464583136657:h3lzpyuunqm', customSearchOptions);
       '010823241464583136657:h3lzpyuunqm', customSearchOptions);
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);


    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
     var options = new google.search.DrawOptions();
     var options = new google.search.DrawOptions();
     options.setAutoComplete(true);
     options.setAutoComplete(true);
     options.enableSearchboxOnly("http://opensourceecology.org/wiki/Open_Source_Ecology:GoogleSearch");
     options.enableSearchboxOnly("http://opensourceecology.org/wiki/Open_Source_Ecology:GoogleSearch");
     customSearchControl.draw('cse', options);
     customSearchControl.draw('cse', options);
  }, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
</html>


Results:
<html>
<div id="cse" style="width:100%;"></div>
<script type="text/javascript">
  google.load('search', '1', {language : 'en'});
  google.setOnLoadCallback(function() {
    var customSearchOptions = {};
    var imageSearchOptions = {};
    imageSearchOptions['layout'] = google.search.ImageSearch.LAYOUT_POPUP;
    customSearchOptions['enableImageSearch'] = true;
    customSearchOptions['imageSearchOptions'] = imageSearchOptions;  var customSearchControl = new google.search.CustomSearchControl(
      '010823241464583136657:h3lzpyuunqm', customSearchOptions);
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    var options = new google.search.DrawOptions();
    options.setAutoComplete(true);
    customSearchControl.draw('cse', options);
     function parseParamsFromUrl() {
     function parseParamsFromUrl() {
       var params = {};
       var params = {};
Line 62: Line 39:
   }, true);
   }, true);
</script>
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" />
<div id="cse" style="width:100%;"></div>
</html>
</html>

Latest revision as of 14:26, 28 March 2012