diff options
Diffstat (limited to 'web/share/js/kvm/atx.js')
-rw-r--r-- | web/share/js/kvm/atx.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/web/share/js/kvm/atx.js b/web/share/js/kvm/atx.js index 61d9b5f9..53c290cf 100644 --- a/web/share/js/kvm/atx.js +++ b/web/share/js/kvm/atx.js @@ -73,13 +73,11 @@ export function Atx(__recorder) { var __clickButton = function(button, confirm_msg) { let click_button = function() { - let http = tools.makeRequest("POST", `/api/atx/click?button=${button}`, function() { - if (http.readyState === 4) { - if (http.status === 409) { - wm.error("Performing another ATX operation for other client.<br>Please try again later"); - } else if (http.status !== 200) { - wm.error("Click error:<br>", http.responseText); - } + tools.httpPost(`/api/atx/click?button=${button}`, function(http) { + if (http.status === 409) { + wm.error("Performing another ATX operation for other client.<br>Please try again later"); + } else if (http.status !== 200) { + wm.error("Click error:<br>", http.responseText); } }); __recorder.recordAtxButtonEvent(button); |