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

153
Views
optimice el código ajax y no me repita

Este es mi código. No quiero repetir mi ajax. ¿Cómo puedo optimizarlo? y luego tener un código más corto? así que les muestro solo un ejemplo aquí:

 function for() { if (forceexs) { if (login == "inte") { $.ajax({ url: "index_content.php?mode=ppanel=forgotten&force_mssante=0", success: function (html) { $(".panel-body").html(i18n.tr(html)); $("#rpps").focus(); }, }); } else if (login == "ex") { $.ajax({ url: "index.php?mode=nel=forgorce_mssante=1", success: function (html) { $(".panel-body").html(i18n.tr(html)); $("#rpps").focus(); }, }); } else { $.ajax({ url: "index.php?mode=phel=internal_or_external", success: function (html) { $(".panel-body").html(i18n.tr(html)); $("#rpps").focus(); }, }); } } else { $.ajax({ url: "index.php?mode=pel=forgotten", success: function (html) { $(".panel-body").html(i18n.tr(html)); $("#rpps").focus(); }, }); } }

Este es el más corto más fácil de entender.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

function ajaxRequest(GETQuery) { $.ajax({ url:'index_content?'+GETQuery, success: function(html) { $(".panel-body").html(i18n.tr(html)); $("#rpps").focus();} }) } }
about 4 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 Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!