1
I am making a request in ajax but the result does not update, it is as if it were in some kind of cookie.
function AtualizaTotalItensNota(idFornec) {
$.ajax({
type: "GET",
dataType: "text",
url: "/sistema/compras/entrada/getitens/" + idFornec,
success: function (result) {
$("#totalitens").text(result)
}
});
}
If I make the request manually by the browser (right in the address bar) it updates, but using the JS function the value is always the same.
Can anyone tell me what it might be?
And when you call the function 'Actualiztotalitensnote'?
– Gabriel Heguedusch
would be after deleting an item from the note, is inside another ajax request:
– Diego Rafael
what comes in result? Success: Function (result) { ///put a console.log(result) here and show, please. $("#totalitens"). text(result) }
– Gabriel Heguedusch
Then, comes the total value of note items, however I delete the item and if I make the request manually from the browser bar the item is updated normally. I have already made an Alert test, it enters the function, however the value that returns in the result is always the last of the request I made directly through the browser bar.
– Diego Rafael
Post the entire code snippet, it’s easier to help like this...
– Gabriel Heguedusch