PROBLEM WITH CUSTOM SEARCH CODE

55 views
Skip to first unread message

chenda...@gmail.com

unread,
Mar 23, 2016, 10:10:12 AM3/23/16
to Google AJAX APIs

I Have a problem with pasting of my custom search code. Please some gentle man or lady come to my help. I am a pro on coding and i mess alot. Think i have problems with understanding the below statement:

(Copy the following code, and paste it into a <div> element in your site's <body> section, where you want both of the search box and the search results to render.

Note: For the most cross-browser compatibility, it is recommended that your HTML pages use a supported doctype such as <!DOCTYPE html>. CSS hover effects require a supported doctype.)


THIS IS THE CODE MINUS THE ID

<script>

  (function() {

    var cx = (I HAVE REMOVED AN ID)

    var gcse = document.createElement('script');

    gcse.type = 'text/javascript';

    gcse.async = true;

    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +

        '//cse.google.com/cse.js?cx=' + cx;

    var s = document.getElementsByTagName('script')[0];

    s.parentNode.insertBefore(gcse, s);

  })();

</script>

<gcse:search></gcse:search>

CODE.docx

Jeremy Geerdes

unread,
Mar 23, 2016, 10:13:02 AM3/23/16
to google-ajax...@googlegroups.com

It is dramatically easier to debug code in a browser. Please provide a link to your page, even if it's not working.

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msgid/google-ajax-search-api/f02dbdbc-b1e6-43ba-b525-d15d5618d2ff%40googlegroups.com
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages