JQuery je podla mna na taku drobnost zbytocne.
Kód:
<script>
function spustiscript() {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'generate.php', true);
xhr.send(null);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4) {
alert('BlaBlaBla was Generated');
}
};
}
</script>
<button type=button onclick="spustiscript()">Spusti</button>