0
Using Js to customize search form
I am trying to Make a html page in which a user would be able to type in a search query and select a preferred search method. I.e. User searches "top artists 2017" then selects from a range of images (as hyperlinks) for example Google as a search option (Other options being YouTube, Yahoo, Wikipedia etc..) and on searching with the use of Js the Google search query Url is combined with the users search query.
5 odpowiedzi
+ 5
where are they searching? from a database or from a file? or are you using google search externally so it can pull in any results? if I understand you correctly, you are in the right direction with fault finding as you will need to create your own query string.
+ 5
for now while I compose a proper answer go study google developers section on search api. I used it a few years ago so ill draw something up for you.
0
It will be used to search externally, I am new to Javascript and I am not sure exactly how it needs to be done, I am assuming that it will be something like this.
for example
var Google = https://www.google.co.za/search?sourceid=chrome-psyapi2&ion=1&espv=2&ie=UTF-8&q=;
$("a.searchengine").on("click",function() { Google + USERS SEARCH QUERY HERE});
but once the search query is combined with googles query Url it needs to be submitted in the search form
0
thanks