User Tools

Site Tools


capri:search

<HTML>

    <div id="content"><!-- Start Inhalt -->
       <div class=rightwindow>

<H2>Search the CAPRI web pages</H2>

<div id=“test”></div>

<script> var myCallback = function() {

if (document.readyState == 'complete') {
  // Document is ready when CSE element is initialized.
  // Render an element with both search box and search results in div with id 'test'.
  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 parameters, like 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>

       </div><!-- Ende RightWindow -->
    </div><!-- Ende content -->

</HTML>

capri/search.txt · Last modified: 2022/11/07 10:23 by 127.0.0.1