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

130
Views
SweetAlert2 - después de actualizar href no funciona

tengo esta cosa Después de actualizar la página, el script deja de funcionar. ¿Cómo debo hacerlo para que funcione?

 <a onclick="confirmation(event)" href="{{ url('trash/delete/'.$items->id) }}"> Delete</a>

este es el guion

 <script> function confirmation(e) { e.preventDefault(); var url = e.currentTarget.getAttribute('href') Swal.fire({ icon: 'warning', title: 'Are you sure?', text: 'This action cannot be undone!', showCancelButton: true, confirmButtonColor: '#3085d6', cancelButtonColor: '#d33', confirmButtonText: 'Yes, recall!' }).then((result) => { if (result.value) { window.location.href=url; } }) } </script>

he probado esto: location.reload(); en multiubicación, pero no funciona

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

0

tu código me funciona usando esta biblioteca

 <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

¿Puedes probar con esto y ver si funciona?

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!