I want that when clicking and accepting the warning, I am redirected to another page. but it doesn't redirect me.
//botón Imprimir
$(document).on("click", ".btnImprimir", function(){
fila = $(this);
id = parseInt($(this).closest("tr").find('td:eq(0)').text());
opcion = 4 //imprimir
var respuesta = confirm("Imprimir la reserva: "+id+"?");
if(respuesta){
$.ajax({
url: "bd/crud.php",
type: "POST",
dataType: "json",
data: {opcion:opcion, id:id},
success: function(data){
if(data){
window.location.replace("../pdf/pdf.php");
}
}
});
}
});