Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

2.2K
Vistas
How to reload a page after clicked ok using sweetalert

Hello I have a code using sweetalert

swal("Good job!", "You clicked the button!", "success")

this code will pop-up a message and has a button okay, what I like to do is I want to refresh the page after I click the okay button.

Can I do that?

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

You can try this, it works for me.

swal({
       title: "Good job", 
       text: "You clicked the button!", 
       type: "success"
     },
   function(){ 
       location.reload();
   }
);
over 4 years ago · Santiago Trujillo Denunciar

0

The answer from Yoshioka did not work for me, I did this and it worked perfectly:

swal({title: "Good job", text: "You clicked the button!", type: 
"success"}).then(function(){ 
   location.reload();
   }
);
over 4 years ago · Santiago Trujillo Denunciar

0

Use the callback function...

Swal.fire({
  // Swal Setting's
}).then((result) => {
  // Reload the Page
  location.reload();
});
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda