Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/06/2006, 08:40
Avatar de Cap.Buscapina
Cap.Buscapina
 
Fecha de Ingreso: octubre-2004
Ubicación: Argentina
Mensajes: 836
Antigüedad: 19 años, 7 meses
Puntos: 4
otra opcion...

holas,

te dejo otra opcion para solucionar tu problema (lo resumí en una sola funcion, pero si fuse necesario , se podría hacer funciones individuales)

Cita:
<html>
<head>
<script>
function verif(ant){
if (document.forms[0][ant].value ==""){
alert ("No puedes dejar el campo "+ant.toUpperCase()+" vacío");
document.forms[0][ant].focus();
}
}

</script></head>

<body>
<form name="alta">
<input name= "plataforma" type = "text" value="" style="text-align:center" size="31" maxlength="30" >

<input name="pozo" type="text" value="" style="text-align:center" size="21" maxlength="20" onfocus="verif('plataforma')">

<input name="qq" type="text" value="" style="text-align:center" size="21" maxlength="20" onfocus="verif('pozo')">

<input name="aa" type="text" value="" style="text-align:center" size="21" maxlength="20" onfocus="verif('qq')">

<input onfocus="verif('aa')" name="Enviar" type="submit" value="Enviar">
</form>

</body>
</html>
saludos
__________________
by Capitán Buscapina
.