//AJAX request method updateCell = function(path, pageType, requestType){ path = path.toLowerCase(); const $element = $("#hello-" + path); $.ajax({ type: requestType, //GET or POST url: "https://server.figytuna.com:8080/ali/hello/" + path, timeout: 2000, //ms beforeSend: function(data){ $element.html("Loading..."); }, success: function(data){ if (pageType == "html"){ $element.html(data); }else{ $element.text(data); } }, error: function(e){ $("#hello-" + path).html("Error " + e.status + " " + e.statusText + ""); } }); } window.onload = function(){ const pageList = { "unsafe": ["World", "Data", "Post"], "html": ["Location", "Players"], } //Generate HTML table for (const pageType in pageList){ for (const path of pageList[pageType]){ //Adds new table row based on the data request const $row = $("