Ver Mensaje Individual
  #17 (permalink)  
Antiguo 18/09/2008, 08:18
binagol
 
Fecha de Ingreso: agosto-2008
Ubicación: Buenos Aires
Mensajes: 247
Antigüedad: 16 años, 5 meses
Puntos: 6
Mil gracias1!!...

barbaro muchas gracias!!!!

Para terminar, estaba intentando agregar un setTimeout() entre cada div....

pense en hacerlo de la siguiente forma, pero no funciona.... como deberia encararlo? o cual es mi error???


Código:
  
<script language="javascript" type="text/javascript">
	
	  function validar(f){
		  nombre = f.nombre.value;
			edad = f.edad.value;
			error_div_nombre = document.getElementById('div_nombre');
			error_div_edad = document.getElementById('div_edad');
			document.getElementById('div_envio').style.display = 'none';
			
		  fallo_validar = false;
			
			if (nombre==""){
  			  setTimeout (function () {
			  error_div_nombre.style.display = 'block';
			  },1000);
			  f.nombre.focus(); 
			  fallo_validar = true;
			}else{
			  error_div_nombre.style.display = 'none';
			}			
			
			if (edad==""){
			  setTimeout (function (){ error_div_edad.style.display = 'block';
			  }, 1000);
			  f.edad.focus(); 
			  fallo_validar = true;		 
			}else{
              error_div_edad.style.display = 'none';
			}
	
			if (fallo_validar==true)
			  return false;
			else
			  return true;
						  
		}
  </script>