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