let encodedAccount = '';
function encodeUsername() {
encodedAccount= encryptValue(document.getElementById('account').value);
alert(encodedAccount);
}
The encryptValue function is an asynchronous AJAX function. The alert
method is not returning a value, it remains as an empty string.
Any suggestions or insights?
Thank you.