I have this ajax request, but its not doing what i wanted it to do, it was suposed to be a GET that returned some data but no matter how i set up the URL it always gives success response even though it was not a success,
var id = 5;
$.ajax({
type: 'GET',
URL: "'../this is totaly wrong/" + id + "'",
success: function(data) {
console.log("success");
window.location.replace("/formex");
}
})
The correct route should be "readForm/:id", but i write it like that and it give success anyway and redirects to the "/formex" page, the url i wrote here doesn't even exist it's just to prove that it gives success even though it shouldn't