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

101
Views
¿Cuándo vuelve a aparecer el envío del formulario y la actualización de la página en mi pantalla de carga?

Estoy tratando de crear una página de inicio de sesión. Hice una pantalla de carga que se desvanece cuando se carga la página.

 $(window).on("load",function(){ setTimeout(function() { $(".loading").fadeOut("slow", function(){ $(".container").fadeIn("slow").css("display", "flex"); }); }, 500); });

El problema está ahí cuando envía un formulario y la página se actualiza porque luego vuelve a aparecer la pantalla de carga. ¿Alguna solución?

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

0

Puede evitar que el formulario se envíe con

 $("#prospects_form").submit(function(e) { e.preventDefault(); })

Sin jQuery:

 var form = document.getElementById("myForm"); function handleForm(event) { event.preventDefault(); } form.addEventListener('submit', handleForm);
about 4 years ago · Juan Pablo Isaza Report

0

1- Puede usar Ajax para enviar el formulario al servidor.

2- O haz algo como esto:

 // add an item to session before form submitting. $(document).on('submit', function (e) { e.preventDefault() sessionStorage.setItem('notLoad', '1') $('form').submit() // add any attr to form idetifier. }) $(window).on('load', function () { // check the session to know if the page loaded from form submitting or not: if (sessionStorage.getItem('notLoad') !== '1') { sessionStorage.removeItem('notLoad'); setTimeout(function () { $('.loading').fadeOut('slow', function () { $('.container').fadeIn('slow').css('display', 'flex') }) }, 500) } })
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!