1
I’m testing a search field that sends what the user types directly to the site I chose (in a new tab), searching the site itself, and it works perfectly. However, I wonder if there is any way I can manipulate this address that is sent to the url.
For example (searching for Youtube): If the user types "best serials" in the form, and presses Enter, the form completes the action with the name (q) and searched term and sends it to the url. Staying: https://www.youtube.com/results?q=best + serials
In this way I wanted it to send the url without the "name" and "?" only with "/" and the searched term, as if it were a normal link. Example: https://www.youtube.com/results/best+ serials
Does anyone know if there is any way to manipulate this, with php or javascript?
Follow the form code:
<form name="searchfield" method="get" action="http://www.youtube.com/results" target="_blank">
<input type="text" id="input" name="q" autocomplete="off" maxlength="100" size="36" placeholder="Pesquise no YouTube">
<input type="image" id="search" name="btnG" src="img/search.png">
</form>
With respect to "" this will only work if the site you are ordering to accept Urls, friendly.
– Erlon Charles
The other site to which you are sending the survey will open on another page?
– Erlon Charles
Yes, it will open in a new tab in the browser.
– André Ferraz