By creating a search link?

Asked

Viewed 70 times

3

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

example: https://jsfiddle.net/juliomoreira666/u3ss4uye/

He wanted that as the fields were being filled, the search button would load the link built.

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

there is such a possibility ?

From now on I thank my friends!

  • Can you explain more about the functionality you want? Is that to use in a querystring? or to go to different urls? there is a form?

  • I still think it was worth answering my question above (even after you accepted an answer)

1 answer

2


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

I don’t know if that’s 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>

  • I understand Fabiano, I will make the tests, but I thank from now on the help! ;)

  • If you like evaluate the answer. Thanks

Browser other questions tagged

You are not signed in. Login or sign up in order to post.