I would like to pass the var data = 'codreq =' + id; variable to two paths. It is possible? If so, someone can teach me. I can only move to this path:
url: "<?= base_url('coordenador/protocolo/buscaDetalhesRequerimento') ?>"
I need to pass this one at the same time:
url: "<?= base_url('coordenador/protocolo/responder_requerimento') ?>"
<script>
$(document).ready(function ()
{
$("a#visualizar").click(function () {
var id = $(this).attr('data-id');
var data = 'codreq=' + id;
//alert(data);
$.ajax({
type: "POST",
url: "<?= base_url('coordenador/protocolo/buscaDetalhesRequerimento') ?>",
data: data,
success: function (text) {
//if (text === "success") {
$(".dados").html(text);
// });
//window.location.reload(true);
//}
}
});
});
});