I have this javascript, but it does not work: the following error appears: {"readyState":0,"responseText":"","status":0,"statusText":"error"}
This script is included in the web page of my site, which is located in a subdirectory of the site.
From my debugging, I don’t understand where the error might come from ... (since I’m exactly the same for the index page of my site with a different javascript that looks almost the same)
$(document).ready(function() {
$('#filterbtn').click(function () {
var a = JSON.stringify( $("#multiselect").val() );
var b;
if ($('#b').prop('checked')) {
b = 0;
} else {
b = 1;
}
var c = JSON.stringify($("#Sliderstart").slider("value"));
var d = JSON.stringify($("#Sliderend").slider("value"));
var data = 'b=' + b + '&c=' + c + '&d=' + d + '&a=' + a;
$.ajax({
url: "./filter.php",
type: "POST",
data: data,
crossDomain: true,
cache: false,
success: function (html) {
document.getElementById("message").innerHTML=html;
},
error: function (e) {
alert(JSON.stringify(e));
}
});
return false;
});
});
Thanks guys!
Greetings
source
share