1
I do not know if it is possible, but I would like to create a link (or simulate one) where I need to pass data to the page of this link, but I would not like to pass this data by get
rather than by post
, not to keep displaying the data (I know that for an advanced user it will be possible to view this data, but there would be no problem).
Below the link I’m creating:
<a href="pagina_a_ser_chamada" data-usuario="1" data-cliente="3" class="openLink">
Abrir dados do cliente 3
</a>
<a href="pagina_a_ser_chamada" data-usuario="1" data-cliente="4" class="openLink">
Abrir dados do cliente 4
</a>
<a href="pagina_a_ser_chamada" data-usuario="1" data-cliente="5" class="openLink">
Abrir dados do cliente 5
</a>
I tried to do something with jQuery, but I could not pass the data usuario
and cliente
and nay I want to spend like this pagina_a_ser_chamada?usuario=1&cliente=3
$(document).ready(function() {
$('.openLink').click(function(event) {
event.preventDefault();
window.open($(this).attr('href'), '_blank');
});
});
I understood what happened to me and my big problem, something I forgot to post is that it is a link to each customer, so the solution you passed does not meet... yes, it may have been a fault of mine here tbm... but I will think how to solve my problem with the solution you sent... Thank you
– Marcelo Diniz
The creation of
form
can be done in the script, try to include more data of how it should be generated I update the response.– Wakim
I made an edit on the question, showing that it is a link to each client, that’s all that changes.. Valew
– Marcelo Diniz
I updated Javascript with the
href
from the link toaction
from the form, which I had forgotten. So, with only one form you can use it for as many links as you want and I believe that the amount of parameters of the link is fixed, if it is variable you need to modify the script to consider this.– Wakim