Skusam jednoduche scripty v AJAXe podla jednej knihy.
Kód: Vybrať všetko
<script type="text/javascript">
var xmlHTTP = new XMLHttpRequest();
var url = "127.0.0.1:8887/script.php?isbn=9780735624498";
xmlHTTP.open("GET", url, true);
xmlHTTP.send(null);
xmlHTTP.onreadystatechange = function () {
if(xmlHTTP.readyState == 4) {
if(xmlHTTP.status == 200){
alert(xmlHTTP.responseText);
}else {
alert(xmlHTTP.statusText);
}
}
}
</script>
Dakujem