Replaced JavaScript XMLHttpRequest.onreadystatechange with XMLHttpRequest.onload.
This commit is contained in:
parent
91d22d72cb
commit
dec53c09f3
@ -50,8 +50,8 @@ let accounts;
|
||||
*/
|
||||
function getAllAccounts() {
|
||||
const request = new XMLHttpRequest();
|
||||
request.onreadystatechange = function() {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
request.onload = function() {
|
||||
if (this.status === 200) {
|
||||
accounts = JSON.parse(this.responseText);
|
||||
}
|
||||
};
|
||||
|
@ -91,8 +91,8 @@ let accountOptions;
|
||||
*/
|
||||
function getAccountOptions() {
|
||||
const request = new XMLHttpRequest();
|
||||
request.onreadystatechange = function() {
|
||||
if (this.readyState === 4 && this.status === 200) {
|
||||
request.onload = function() {
|
||||
if (this.status === 200) {
|
||||
accountOptions = JSON.parse(this.responseText);
|
||||
$(".record-account").each(function () {
|
||||
initializeAccountOptions($(this));
|
||||
|
Loading…
Reference in New Issue
Block a user