I want to check the number of user input. If it negative number it will disable the sumbit botton.
my code is run but let say i enter three -1 and if i change of it to positive the sumbit botton is enable. I want make sure if all the number positive before enable sumbit botton
here is code
if (x < 0 )
{
if (document.getElementById('AX') && document.getElementById('XR') && document.getElementById('ZZ') < 0)
{
document.getElementById('cmdSubmit').disabled = true;
alert('There is a problem! Cannot be negative number.');
return false;
}
// If the script gets this far through all of your fields
// without problems, it's ok and you can submit the form
else
{
document.getElementById('cmdSubmit').disabled = false;
return true;
}
}