Search code examples
javascriptjquerygoogle-apigoogle-search-api

Google Search API - "No results" text


Is anybody have an idea how can I change the "No results" to some other text...

I have this code:

function OnLoad() {
  // Create a custom search control that uses a CSE restricted to code.google.com
  var customSearchControl = new google.search.CustomSearchControl('http://******');

  // Draw the control in content div
  customSearchControl.draw('ArticleGoogleSearchBox');

}

Any Ideas???


Solution

  • There is option like .setNoResultsString(str)

    https://developers.google.com/custom-search/docs/js/cselement-reference#cse-el