Creating a search link?

3

I have a problem in a project, there are 3 product search fields and a search button.

example: link

I wanted as the fields were filled out, the browse button would load the link built.

Example: There are 3 fields so they would look like this / www.rs1.com.br/valor1/valor2/valor3

Is there such a possibility?

Thanks in advance!

    
asked by anonymous 26.08.2015 / 19:49

1 answer

2

You can assemble the link according to the content of the fields with javascript.

I do not know if it would be the best option, but it works.

Take the test.

<div class="container">
    <input id="montadora" type="text" value="montadora"></input>
    <input id="modelo" type="text" value="modelo"></input>
    <input id="ano" type="text" value="ano"></input>
    <INPUT type="reset"  name="b2" value="Limpar">
    <INPUT type="submit" name="b1" value="Pesquisar" onClick="location.href='http://www.rs1.com.br/'+document.getElementById('montadora').value+'/'+document.getElementById('modelo').value+'/'+document.getElementById('ano').value">
</div>
    
26.08.2015 / 20:11