Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
Loader solo funciona en la primera llamada ajax

Quiero que el cargador permanezca hasta que se complete la ejecución completa y se haya ejecutado la instrucción $("#xyzDiv").html(data). Actualmente, el cargador se oculta después de la primera llamada ajax. Incluso si agrego "beforeSend: function () { $("#loader").show(); }" a GetDataList(), el cargador no se queda.

 $.ajax ({ type: "POST", url: ajaxUrl, data: dataObj, beforeSend: function () { $("#loader").show(); }, success: function (data) { if (data.result) { GetDataList(); toastr.success(data.strMsg); } else { toastr.error(data.strMsg); } }, error: function (jqXHR, textStatus) { var msg = HandleAjaxErrorMessage(jqXHR, textStatus); console.log(msg); toastr.error('An error occurred. Please try again'); }, complete: function () { $("#loader").hide(); } }); function GetDataList() { $.ajax ({ type: "Get", url: ajaxUrl, data: dataObj, success: function (data) { $("#xyzDiv").html(data); }, error: function (jqXHR, textStatus) { var msg = HandleAjaxErrorMessage(jqXHR, textStatus); console.log(msg); toastr.error('An error occurred. Please try again'); } }); }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!