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.

26th Mar 2017, 4:14 PM
Stephen Venter
Stephen Venter - avatar
5 Respostas
+ 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.
26th Mar 2017, 6:50 PM
Andre van Rensburg
Andre van Rensburg - avatar
+ 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.
26th Mar 2017, 7:01 PM
Andre van Rensburg
Andre van Rensburg - avatar
29th Mar 2017, 9:49 AM
Andre van Rensburg
Andre van Rensburg - avatar
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
26th Mar 2017, 6:56 PM
Stephen Venter
Stephen Venter - avatar
0
thanks
28th Mar 2017, 5:41 AM
Alain Chassman