Google cse not working

2 replies
  • WEB DESIGN
  • |
We had Google cse working on our blog
(E-junkie.info - Small Business, Self Publishing, E-Commerce Blog) for the past 3 years and it was working fine. But for the last 2-3 weeks it just shows up as Loading without the search box being created. The code has not been changed in the past. I am posting the code for your reference here: Also I noticed in the google error console 2 same errors "Cannot read property "CustomSearchControl" of undefined.
The Code:
<div id="cse-search-form" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load('search', '1', {language : 'en'});
google.setOnLoadCallback(function(){
var customSearchControl = new google.search.CustomSearchControl('001968521647260 779997:qyy7a_cvtdo');
customSearchControl.setResultSetSize(4);
var options = new google.search.DrawOptions();
options.setSearchFormRoot('cse-search-form');
options.setAutoComplete(true);
customSearchControl.draw('cse-search-form', options);
}, true);
</script>

Can anyone help us solve the problem? Any favours appreciated!
#cse #google #working
  • Profile picture of the author jpweb
    Have you done any changes on the site? I am seeing an undefined error to google.search If you have added any caching scripts, or minifiers, moved code around or added new JS, something is conflicting with the Javascript.
    {{ DiscussionBoard.errors[8953238].message }}
    • Profile picture of the author sree2010
      I have not made any changes to the code. I too was seeing the error you mentioned in all the browsers, but now the google cse button loads, just that I do not get any results nor ads. However I still see the error in IE8. Thanks in advance and appreciate your effort in helping me through.
      {{ DiscussionBoard.errors[9062890].message }}

Trending Topics