// JavaScript Document var xmlhttp=false; function claimbonus(user, type, id){ xmlhttp = new XMLHttpRequest(); xmlhttp.abort(); xmlhttp.open("GET", "/functions/ajax.php?func=claim_bonus&user="+user+"&type="+type, true); xmlhttp.onreadystatechange=function() { if(xmlhttp.status == 200) { document.getElementById(id).innerHTML = xmlhttp.responseText; } } xmlhttp.send(null); }