I have to link to a database on a site but I get this error and I do not know what you mean "XMLHttpRequest cannot load http://apptablet.altervista.org/Prova.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access." This is the function that is performed in the load
function fo() {
alert("Ciao");
    httpreq = new XMLHttpRequest();
    httpreq.onreadystatechange = function () {
        if (httpreq.readyState == 4 && httpreq.status == 200) {
            if (rip == 0) {
                alert(httpreq.responseText.split('-')[0]);
                document.getElementById("temp").value = httpreq.responseText.split('-')[0];
                alert(httpreq.responseText.split('-')[1]);
                if (httpreq.responseText.split('-')[1] == 1) {
                    document.getElementById("OnOff").value = "ON";
                }
                else {
                    document.getElementById("OnOff").value = "OFF";
                }
                rip++;
            }
        }
    };
    httpreq.open("POST", "http://apptablet.altervista.org/Prova.php");
    httpreq.responseType = "text";
    httpreq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    httpreq.send();
}
