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

159
Vistas
confirm change SELECT with PHP and JS

I have 2 files, 1 for the PHP(html) and 1 for the JS code. I want to confirm any change on my SELECT...

PHP:

<select id="transfer_option" onchange="transfer_select()">
foreach (get_users() as $user){
       <option>$user['email']</option>
}
</select>

and on my JS file :

transfer_select() {
      if(confirm('Are you sure ?')){
            *ajax code, not important*
      }
}

But when I change the option and cancel, the option change anyway...

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use another jquery library like a sweet alert for confirmation

https://sweetalert2.github.io/ 
about 4 years ago · Juan Pablo Isaza 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