CAPRI
images/capri_pic_01.jpg images/capri_pic_02.jpg images/capri_pic_03.jpg

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
capri:search [2011/04/12 11:49] – external edit 127.0.0.1capri:search [2018/07/03 10:19] gocht
Line 12: Line 12:
  
  
-<div id="cse" style="width: 96%">Loading</div> + 
-<script src="//www.google.com/jsapitype="text/javascript"></script> +<div id="test"></div> 
-<script type="text/javascript">  + 
-  google.load('search', '1', {language : 'en'})+<script
-  google.setOnLoadCallback(function() { +var myCallback function() { 
-    var customSearchControl new google.search.CustomSearchControl('009539913617910995433:s3savsxg4cs')+  if (document.readyState == 'complete') { 
-    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET)+    // Document is ready when CSE element is initialized. 
-    customSearchControl.draw('cse'); +    // Render an element with both search box and search results in div with id 'test'
-  }, true);+    google.search.cse.element.render( 
 +        { 
 +          div: "test"
 +          tag: 'search' 
 +         }); 
 +  } else { 
 +    // Document is not ready yet, when CSE element is initialized. 
 +    google.setOnLoadCallback(function() { 
 +       // Render an element with both search box and search results in div with id 'test'. 
 +        google.search.cse.element.render( 
 +            { 
 +              div: "test", 
 +              tag: 'search' 
 +            }); 
 +    }true); 
 +  } 
 +}; 
 + 
 +// Insert it before the CSE code snippet so that cse.js can take the script 
 +// parameterslike parsetags, callbacks. 
 +window.__gcse = { 
 +  parsetags: 'explicit'
 +  callback: myCallback 
 +}; 
 + 
 +(function() { 
 +  var cx = '009539913617910995433:s3savsxg4cs'; // Insert your own Custom Search engine ID here 
 +  var gcse = document.createElement('script'); gcse.type = 'text/javascript'; 
 +  gcse.async = true; 
 +  gcse.src = 'https://cse.google.com/cse.js?cx=' + cx
 +  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); 
 +})();
 </script> </script>
-      + 
 + 
 +     
  
  
   
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International