show multiple result for single page Google custom search
Asked Answered
U

0

8

I have single page application in which I want to apply Google custom search. What my requirement is when I search something then it will show result from each section of the page. I have created anchor tag links whenever click on them it will redirect me to that section of the page.

What I try till now I applied code which comes from while creating search engine here is my code:

(function() {
    var cx = 'xxxxxxxxxxxxxxxx:xxxxxxxxxx'; //my engine id
    var gcse = document.createElement('script');
    gcse.type = 'text/javascript';
    gcse.async = true;
    gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(gcse, s);
})();

Thanks for the help!

Ultramicroscope answered 13/5, 2018 at 3:23 Comment(1)
So community, there is no answer to this question or Please! redirect me to right direction. ThanksUltramicroscope

© 2022 - 2024 — McMap. All rights reserved.