I am loading data on a mouse-over-event. Do this via Ajax (jQuery) - like so:
var city_id=element.id;
console.log("CityID="+city_id);
var pfad="http://localhost/juwel/weltreise_get_city_status.php";
var parameter={
city_id : city_id
};
jQuery.ajax({
url : pfad,
data: parameter
})
.done(function(response){
var dummy=response.split("|");
if (dummy[0]=="OK") {
var citystatus=document.getElementById("citystatus").
citystatus.style.display="block";
citystatus.innerHTML=dummy[1];
}else{
alert(response);
}
})
.fail(function(xhr, status, errorThrown) {
alert("Ajax Fehler.\nStatus="+status+"\nFehler="+errorThrown,"error");
});
Always get the error that the file was not found. Although it is definitely there. Wenn I call the "path" manually - everything works.
What am I missing here?