• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

245
Views
using async/await insted of AJAX

I am going to use async await instead of AJAX in jsp file. How can I use async/await? This is my code:

function setAcc(){
    var acc_ = getDOM("acc_").value
    AJAX.load({POST: {request: 'set_acc', async: false, acc_: acc_},
        onSuccess: function (result) {
            var objJSON = eval("(function(){return " + result + ";})()");
        go({});
        },
        onError: function (d) {
            alert_g(eval(d));
        }
    });
}
about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Instead of ajax you should use axios library for that and then use async and await accordingly for the Server request's.

Try this link for more understanding

  • async await using axios
about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error