google-custom-search

Loading Google Custom Search results without page refresh

筅森魡賤 提交于 2019-12-02 08:08:06
I would like to submit a google custom search query without reloading/refreshing the entire html page. I'm using the latest v2 gcs with the 'Results Only' layout. Loading the gcs api, anywhere above the Search Form <script src="//www.google.com/jsapi" type="text/javascript"></script> <script> google.load('search', '1', {language : 'en', style : google.loader.themes.V2_DEFAULT}); </script> My Custom Search Form <form onsubmit="return executeQuery();" id="cse-search-box-form-id"> <input type="text" name="q" id="cse-search-input-box-id" size="25" autocomplete="off"/> <input type="submit" id="site

Multiple GCSE's on page at one time.

霸气de小男生 提交于 2019-12-02 07:33:25
Using the new GCSE code like so: // google custom search engine for the whole site (function() { var cx = '*****************'; 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 + '&gname=sitesearch'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s); })(); and the element like so: <gcse:searchbox gname="sitesearch"></gcse:searchbox> <gcse:searchresults gname="sitesearch"></gcse:searchresults> How do I go

Google Api Keys for Windows Phone App

感情迁移 提交于 2019-12-02 01:05:28
I want to integrate google custom search in windows phone app for image searching I create the project on https://console.developers.google.com/ When i went to API & Authentication section of project description to create Api key,A popup is giving only four option server key,browser key,android key and ios key.There is no option to create api key for windows phone app. Is it not possible to integrate google custom search in windows phone app. Feel free to opt for iOS key, it does not matter. I did so previously while working with Google Tasks API and all is fine... I created a browser key for

Multiple Google CSE (Custom Search Engine) Boxes on Same Page

拟墨画扇 提交于 2019-12-02 00:22:43
问题 I am trying to implement two (different) Google CSE search boxes on the same page. The issue is that only the first instance works properly. For example, a sitewide search box in the header, then on certain pages, a 2nd search box that searches within a narrow silo of the site, etc. This doesn't work properly in that with using the google-generated code for each box, they both get the same form ID, which is obviously not valid. This causes the google watermark branding to fail to appear in

Date range search using Google Custom Search API

限于喜欢 提交于 2019-12-01 06:27:15
I am using the Google Custom Search API to search for images. My implementation is using Java, and this is how I build my search string: URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?" + "v=1.0&q=barack%20obama&userip=INSERT-USER-IP"); How would I modify the URL to limit search results, for example, to: 2014-08-15 and 2014-09-31 ? You can specify a date range using the sort parameter. For your example, you would add this to your query string: sort=date:r:20140815:20140931 . This is documented at https://developers.google.com/custom-search/docs/structured_data#page

How to trigger specific Google Custom Search Engine refinement label?

寵の児 提交于 2019-12-01 06:12:18
问题 Currently, our organization is using Google Custom Search engine to provide auto suggestion, and we have about 3 refinement labels configured in our CSE. Previously, we're using WebSearch and SearchControl, and the WebSearch has a setSiteRestriction method which allows us to specifically select a refinement label: - http://code.google.com/apis/websearch/docs/reference.html#_class_GwebSearch Previous code example: var searchControl = new google.search.SearchControl(); var webSearch = new

Date range search using Google Custom Search API

£可爱£侵袭症+ 提交于 2019-12-01 04:53:26
问题 I am using the Google Custom Search API to search for images. My implementation is using Java, and this is how I build my search string: URL url = new URL("https://ajax.googleapis.com/ajax/services/search/images?" + "v=1.0&q=barack%20obama&userip=INSERT-USER-IP"); How would I modify the URL to limit search results, for example, to: 2014-08-15 and 2014-09-31 ? 回答1: You can specify a date range using the sort parameter. For your example, you would add this to your query string: sort=date:r

Google site search catch search submit and trigger function

瘦欲@ 提交于 2019-11-30 22:05:58
I have a page with just a searchbox on provided by google <gcse:search></gcse:search> Now when I type in the search box and hit enter I would like to trigger my script to run as the search results gets returned. Things I have tried sofar Here I tried to use the submit event to trigger my script $(document).on('submit', 'input', function(e) { alert('trig'); } Here I tried to catch the enter key as I have removed the search button $(document).keypress(function(e) { alert('triggered'); }); Here I tried to catch the focus on the form id $('#gsc-i-id1').focus().trigger(function(e) { alert(

Google site search catch search submit and trigger function

我与影子孤独终老i 提交于 2019-11-30 17:53:15
问题 I have a page with just a searchbox on provided by google <gcse:search></gcse:search> Now when I type in the search box and hit enter I would like to trigger my script to run as the search results gets returned. Things I have tried sofar Here I tried to use the submit event to trigger my script $(document).on('submit', 'input', function(e) { alert('trig'); } Here I tried to catch the enter key as I have removed the search button $(document).keypress(function(e) { alert('triggered'); }); Here

How to use Google Custom Search for image search in objective c

左心房为你撑大大i 提交于 2019-11-30 14:14:11
问题 can any one please tell me how I can use google custom search in my iphone application to search images only. I tried it but it asks for 'cse' or 'cx' parameter. Please help. 回答1: The Google Custom Search API lets you develop websites and programs to retrieve and display search results from Google Custom Search programmatically. With this API, you can use RESTful requests to get either web search or image search results in JSON or Atom format. See the available documentation here See this one