diff --git a/styles/bootstrap/js/script.js b/styles/bootstrap/js/script.js index 479b47a..dfdc78b 100644 --- a/styles/bootstrap/js/script.js +++ b/styles/bootstrap/js/script.js @@ -1,6 +1,7 @@ function ajaxRemote (method, url, data, successCallback) { var xhttp = new XMLHttpRequest(); + let sendData = null; xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { successCallback(this); @@ -9,7 +10,7 @@ function ajaxRemote (method, url, data, successCallback) xhttp.open(method, url, true); if (method == 'POST') { xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + sendData = data; } - let sendData = method == 'POST' ? data : null xhttp.send(sendData); }