I'm not sure what I'm doing wrong but the Google Custom Search I'm setting up on this site I have is not working the way I need it to. What I want is for the results to display within a page, and while the search takes me to the page, the results appear in a popup window for some reason.
This is what I have:
<script>
(function () {
var cx = '[hidden]';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
<gcse:searchbox-only linktarget="_self" resultsUrl="/HomePage/Search-Results"></gcse:searchbox-only>
I tried using _parent for linktarget, but that did not solve the issue, either. Is there a way to disable this Google Custom Search from opening results in pop-ups?
Go to Google Custom Search Control panel. Select the Search-engine where you generated the Key & Code. Go to Look and Feel, from the sidebar. Change the Layout from 'Overlay'(Popup) to the desire style you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With