Embedding Google Search Engine Into Sidebar

  • Unknown's avatar

    Does anybody know how to put a google search engine into a sidebar? I have been trying to get my custom search into my sidebar, but It won’t work. The HTML is displayed instead of the search engine. This has also happened to me when I’ve tried to embed other things into my sidebar. If somebody could help me, that would be great. If it helps you, the code is:

    <div id="cse" style="width: 100%;">Loading</div>
    <script src="https://www.google.com/jsapi" type="text/javascript"></script>
    <script type="text/javascript">
    google.load('search', '1', {language : 'en', style : google.loader.themes.SHINY});
    google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('004279859908213914819:rsqn-2arza0');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw('cse');
    }, true);
    </script>

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    That is javascript and javascript is not allowed here for security reasons.

    Add Code to Your Site

  • The topic ‘Embedding Google Search Engine Into Sidebar’ is closed to new replies.