function getValue() { return new Promise((resolve, reject) => { $.ajax({ type: "GET", url: "https://ceclnx01.cec.miamioh.edu/~campbest/cse451/exam1.php", dataType: "json", success: function (data) { resolve(data); }, error: function (data) { reject(" can't get Keys"); } }); }); } window.onload = function(){ let dataArea = $("#dataPlace"); getValue().then(function onFulfilled(value) { dataArea.html( "