Reputation: 2261
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???
Upvotes: 0
Views: 832
Reputation: 346
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.
Upvotes: 1
Reputation: 815
There is option like .setNoResultsString(str)
https://developers.google.com/custom-search/docs/js/cselement-reference#cse-el
Upvotes: 2