Ver Mensaje Individual
  #2 (permalink)  
Antiguo 06/10/2010, 12:55
Avatar de _cronos2
_cronos2
Colaborador
 
Fecha de Ingreso: junio-2010
Mensajes: 2.062
Antigüedad: 13 años, 10 meses
Puntos: 310
Respuesta: ayuda con metodo confirm

Esque primero hay que validarlo y después mandar el confirm.
Código Javascript:
Ver original
  1. function pregunta(frm){
  2. if(frm.nombre.value==''){
  3. alert('pon el nombre');
  4. return false;
  5. }
  6. if(frm.apellido.value==''){
  7. alert('pon tu apellido');
  8. return false;
  9. }
  10. //...
  11. return confirm('¿Los datos ingresados son correctos?');
  12. }
Y en el onsubmit:
Código HTML:
Ver original
  1. <form id="usuario" name="usuario" method="post" action="ingresar_usuario.php" onsubmit="return pregunta(this);" >
Saludos (:
__________________
" Getting older’s not been on my plans
but it’s never late, it’s never late enough for me to stay. "
Cigarettes - Russian Red