Forum Moderators: open
////////////Start of Code
function validate(isForm){
var chares;
n = 0;
nElements = isForm.length;
for (i=0; i<nElements; i++)
{
if (isForm[i].type!= 'file')
{
if (isForm[i].value == "")
{
isForm[i].style.backgroundColor = 'green';
alert('Falta informacion');
isForm[i].focus();
return false
}//If is empty
else if(isForm[i].name=="WhiteElo" && (isNaN(parseInt(isForm[i])) ¦¦ isForm[i].value<1599 ¦¦ isForm[i].value>2800))
{alert("White Elo error. Its value is: " + isForm[i].value);isForm[i].focus();return false}
else
{
isForm[i].style.backgroundColor = 'white'
}
}//if not file
}//for
return true
}//validate
//////////////end of code
However even when I enter a valid number it keeps telling its wrong...
so...where's my mistake!?
thanks for your time