0

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???

BorisD
  • 2,231
  • 5
  • 25
  • 35

2 Answers2

2

There is option like .setNoResultsString(str)

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

Miki Shah
  • 815
  • 9
  • 20
1

You can find the clear solution here from this URL https://developers.google.com/custom-search/docs/js/rendering. Read section "Example: Using data attributes for conditionals, iteration, and local variables" and apply if-else attributes to customize your search contents.

Prateek Sharma
  • 346
  • 3
  • 12