0
In the Success function I am not able to set a value of a div with the content of the date variable
$(document).on("click", ".js-busca-previsao-chegada", function(event) {
event.preventDefault();
var familia = $(this).attr("js-familia");
var esferico = $(this).attr("js-esferico");
var cilindrico = $(this).attr("js-cilindrico");
$
.ajax({
async: false,
type: "GET",
url: "/buscaprevisaochegada",
dataType: 'json',
data: {
"familia": familia,
"esferico": esferico,
"cilindrico": cilindrico
},
success: function(data) {
$("#js-tooltip-previsao").text(data);
}
});
});
You have verified what is coming in the date variable?
– Wictor Chaves
when I place console data nothing appears my problem is rightly Success: Function(data)
– Joyce SD
The problem may be in your url "search prediction of arrival"
– Wictor Chaves
before it returned a string and not a json made the switch here and now the value passes on the console. Thanks @Wictorchaves
– Joyce SD