Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/01/2013, 14:47
Avatar de maycolalvarez
maycolalvarez
Colaborador
 
Fecha de Ingreso: julio-2008
Ubicación: Caracas
Mensajes: 12.120
Antigüedad: 15 años, 9 meses
Puntos: 1532
Respuesta: valdiar 2 input on submit

simple, no retornes de una vez, usa una variable para el retorno y pasa la instancia del form, no de un solo elemento:

<form id="registracion" enctype="multipart/form-data" name="registracion" method="post" action="borrar.php" onsubmit="return compruebaCv(this);">

Código Javascript:
Ver original
  1. function compruebaCv(formulario) {
  2.     var retorno = true;
  3.     if (! formulario.elements['archivo'].value) {
  4.         alert("Debes subir tu archivo 1")
  5.         retorno = false;
  6.     }
  7.     if (! formulario.elements['archivo2'].value) {
  8.         alert("Debes subir tu archivo 2")
  9.         retorno = false;
  10.     }
  11.     return retorno; //si todo ha sido correcto, retornará true
  12. }
__________________
¡Por favor!: usa el highlight para mostrar código
El que busca, encuentra...