capri:search
                Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| capri:search [2011/04/12 10:41] – gocht | capri:search [2022/11/07 10:23] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | < | ||
| + | <div id=" | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | |||
| + | < | ||
| + | |||
| + | |||
| + | |||
| + | <div id=" | ||
| + | |||
| + | < | ||
| + | var myCallback = function() { | ||
| + | if (document.readyState == ' | ||
| + | // Document is ready when CSE element is initialized. | ||
| + | // Render an element with both search box and search results in div with id ' | ||
| + | google.search.cse.element.render( | ||
| + | { | ||
| + | div: " | ||
| + | tag: ' | ||
| + | }); | ||
| + | } 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 ' | ||
| + | google.search.cse.element.render( | ||
| + | { | ||
| + | div: " | ||
| + | tag: ' | ||
| + | }); | ||
| + | }, true); | ||
| + | } | ||
| + | }; | ||
| + | |||
| + | // Insert it before the CSE code snippet so that cse.js can take the script | ||
| + | // parameters, like parsetags, callbacks. | ||
| + | window.__gcse = { | ||
| + | parsetags: ' | ||
| + | callback: myCallback | ||
| + | }; | ||
| + | |||
| + | (function() { | ||
| + | var cx = ' | ||
| + | var gcse = document.createElement(' | ||
| + | gcse.async = true; | ||
| + | gcse.src = ' | ||
| + | var s = document.getElementsByTagName(' | ||
| + | })(); | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | </ | ||
