This is the code.
The JS get all input tags (avoid the hidden and disable tags) and if is finding a empty field is just inform you about that.
function check_inputs()
{
for( var i = 0; i < document.getElementsByTagName('input').length; i++ )
{
if ((document.getElementsByTagName('input')[i].value=="") && (document.getElementsByTagName('input')[i].type!="hidden") )
{
if (document.getElementsByTagName('input')[i].disabled!=true)
alert(document.getElementsByTagName('input')[i].name+' este gol !\n Please fill all the empty fields!'+document.getElementsByTagName('input')[i].disabled);
else
continue;
return false;
}
}
return true;
}
to use him just look at the next code
<input type="submit" name="action" value="Search" onclick="return check_inputs();">
If you have an empty field then you cannot submit.
Regards