I use $ajax requests in many parts of my PHP website everything was working perfectly until few days ago all my $ajax requests start giving e
I don't know if this would help you, but i had the same issue a while ago, the only action i did was removing this from my jquery ajax functions
dataType: "json"
Here is some functions i made ("mostrar_alert_ui" is a modal alert windows function, same as "MostrarVentanaBoton" wich is a confirm alert function)
//Función ajax con alert
function Funciones_Ajax_conAlert(urlx, datax, callback, phpencode) {
var TodoBien = false;
$.ajax({
type: "POST",
url: urlx,
data: datax,
async: true,
success: function (data) {
if (phpencode == true) {
data = $.parseJSON(data);
}
console.log(data) //Solo para propositos de debug
if (data.success) {
MostrarVentanaBoton(data.titulo, data.mensaje, data.boton, callback);
} else {
mostrar_alert_ui(data.titulo, data.mensaje)
}
},
error: function (xhr, ajaxOptions, thrownError) {
alert("Failed " + urlx);
alert(xhr.responseText);
alert(thrownError);
}
});
}
And just in case, double check the directions