4
Galley,
I have the following problem, I have a table and every record I have a link.
By clicking on this link I take the ID as follows and call a modal.
<script>
$(document).on("click", "a", function(){
if ($(this).hasClass("clique")) {
var id = $(this).attr('id');
$('#md-default').modal('show');
}
});
</script>
In this modal I have a confirmation button, how can I get the id I clicked on the link? There is how to declare a global variable and store the ID value in it and then recover by clicking the other button?
<script>
$('#submitButton').click(function() {
alert("Como pegar o ID alterior??");
}
</script>
Could you add this value to an Hidden input for example? Is this an input or a link? You cannot pass the parameter by GET?
– Mario de M. Barros Neto