La validacion no me esta funcionando en todos los campos, ya he mirado y comparado con ejemplos de otros formularios que tengo pero no encuentro cual sera mi error
Agradezco me puedan colaborar y decirme cual es mi posible error
Aca el codigo html de ingreso de los valores:
Código HTML:
Ver original
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<center>
</center>
<br />
<hr />
<form name="datos">
** 
<img src="Imagenes/radical.gif" alt="signo radical" width="44" height="48">
<input type="text" name="raiz">
<center><input type="button" value="Calcular Perimetro" onClick="sumar()" >
</body>
</html>
Y aca el codigo JavaScript donde ejecuto la funcion sumar() ubicada en el head
Código Javascript:
Ver original
<script languaje="JavaScript">
function sumar()
{
ladoa=parseFloat(document.getElementById('ladoa').value);
ladob=parseFloat(document.getElementById('ladob').value);
ladoc=parseFloat(document.getElementById('ladoc').value);
if ((document.datos.ladoa.value.length== "") || (document.datos.ladob.value.length== "") || (document.datos.ladoc.value.length== "") )
{
alert("EXISTEN VALORES NO INGRESADOS");
return false;
}
if ((document.datos.ladoa.value <= 0) || (document.datos.ladob.value <= 0) || (document.datos.ladoc.value <= 0))
{
alert("SOLO PUEDE INGRESAR VALORES POSITIVOS");
return false;
}
if ( isNaN(ladoa) || isNaN(ladob) || isNaN(ladoc) )
{
alert("TODOS LOS CAMPOS DEBEN SER VALORES NUMERICOS");
return false ;
}
ladoc=document.datos.raiz.value= Math.sqrt(ladoc);
perimetro=ladoa + ladob + ladoc ;
document.getElementById('perimetro').value=perimetro;
}
</script>
Donde tengo mi error??..
Agradezco la colaboracion
 
 



