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

48
Views
Llamada Ajax en el controlador de envío Validación Jquery

Tengo un formulario que tiene un name=select[] , y este formulario se valida desde Jquery Validation y después de una validación exitosa. .

 function:submitHandler { $.ajax({ url: "processo.php", type: "POST", data: new FormData(this), cache: false, processData:false, success: function(data) { $('#loading').hide(); $("#message").html(data); } }); }

Ahora, cuando la validación se realizó con éxito, el nuevo FormData (esto) no reconoce la identificación del formulario. Pero cuando coloco new Formdata($("#frmRegister")[0]) , entonces envía variables a php pero no a la matriz. ¿Cómo puedo definir la identificación del formulario como new Formdata("#frmRegister") ? Recuerde que también tengo una matriz de selección múltiple en el formulario.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

El submithandler de envío va dentro del método .validate() y usaría el argumento de form proporcionado por el desarrollador.

 $('#myform').validate({ submitHandler: function(form) { $.ajax({ url: "processo.php", type: "POST", data: new FormData($(form)), cache: false, processData: false, success: function(data) { $('#loading').hide(); $("#message").html(data); } }); return false; }, // other options });

También puede usar $(form).serialize(); en cambio

about 4 years ago · Santiago Trujillo Report

0

Muchas gracias por dar la respuesta. Tengo una solución. Aquí está el código.

 function: submitHandler { $("#frmRegister").load("submit", function (e)// Trigger Submit When Validation Done { $.ajax({ url: "processo.php", type: "POST", data: new FormData(this), cache: false, processData: false, success: function (data) { $('#loading').hide(); $("#message").html(data); } }); }); }
about 4 years ago · Santiago Trujillo 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!