Ver Mensaje Individual
  #11 (permalink)  
Antiguo 02/09/2010, 13:48
naciostars
 
Fecha de Ingreso: enero-2009
Ubicación: Neiva, Huila
Mensajes: 196
Antigüedad: 15 años, 4 meses
Puntos: 2
Respuesta: Como realizar obligatorios aleatorios

no se si interpreto de forma correcta tu peticion...pero si si es asi....es sencillo basta con que pongas....

<html>
<head>
<script>
function validar(f)
{
if(f.nombre.value=="" || f.apellidop.value=="")
{
if(f.cuenta.value=="")
{
alert('Lo sentimos como requisito minimo debe ir el numero de la cuenta o bien nombre y apellido paterno');
return false;
}
}
return true;
}
</script>
</head>
<body>
<p>Datos del Alumno</p>
<form action="modielim.php" method="POST" name="forma" onSubmit="return validar(forma)">
Nombre: <input type="text" name="nombre" id="nombre" size="30" /> &nbsp;
Apellido Paterno: <input type="text" name="apellidop" id="apellidop" /> &nbsp;
Apellido Materno: <input type="text" name="apellidom" id="apellidom" /><br/><br/>
Numero de Cuenta: <input type="text" name="cuenta" id="cuenta" /> &nbsp;
<input type="submit" value="Modificar" name="modicar" id="modificar"/>&nbsp;&nbsp;
<input type="reset" value="Limpiar Formulario" name="limpieza" />
</form>
</body>
</html>


avisas si algo