I have webpage with many check boxes which call a Javascript function when clicked:
<input type='checkbox' name='Box[]' value='3313' id='chk_3313' onclick='UpdateRecord(3313, this.checked);' >
Javascript function:
function UpdateRecord(uid, chk) {
chk = (chk==true ? "1" : "0");
var url = "update_db.php?qso_id="+uid;
if(window.XMLHttpRequest) {
req = new XMLHttpRequest();
} else if(window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.open("GET", url, true);
req.send(null);
}
I would like the webpage to be refreshed each time a box is checked. With adding location.reload() at the end of the function, the page is reloaded but the update_db.php page is not called anymore. How can I reload the page after the record is updated?