2
I have a mini search site: http://www.cosmo-search.url.ph
, and when typed
www.cosmo-search.url.ph/search?q=PESQUISA-FEITA-PELO-USUÁRIO
I need you to be redirected to
br.search.yahoo.com/yhs/search?p=PESQUISA-FEITA-PELO-USUÁRIO&hspart=Ballooninc&hsimp=yhs-selfserve_5414a9bb52031219
following the example of 22find, which when requested "http://www.22find.com/web?q=PESQUISA"
, is redirected to search.yahoo.com/search?q=PESQUISA
.
Sorry, I was busy. And as I apply this in the form?
– Gustavo Barbosa
<form="get" action="https://br.search.yahoo.com/yhs/search"> <input id="search-box" name="p" type="text" autofocus value="" autocomplete="off"/> <input type="Hidden" id="hspart" name="hspart" value="Oninc"> <input type="Hidden" id="hsimp" name="hsimp" value="yhs-selfserve_5414a9bb52031219"> <input type="image" src="Buttons/Submit.png" value=""> </form>
– Gustavo Barbosa
Now a little bit I bumped into this snippet to pull all the vars of the query: http://stackoverflow.com/a/21152762
– brasofilo
@Gustavobarbosa if you want to do it via client (javascript) then you should not submit the form. You must stop Submit and redirect without going through the server. That’s what you want?
– Sergio
I want to have my server’s /search page redirect the search to Yahoo. Ex: Click on the link and see: http://www.22find.com/web?q=suasearch
– Gustavo Barbosa
@Gustavobarbosa, test add this code that I have now added to the answer at the bottom of your page. Before the
</body>
– Sergio