Yes, I know that Stacked has a lot of questions related to form validation, but so far some of them have been very close to what I'm trying to accomplish, I think this is unique.
I have this JS fiddle with this script that I want to use will return all fields by name that were not filled. I believe this is a much better approach, since I did it below the code to try to execute the same result with a few field checks:
function validate ( )
{
valid = true;
if ( document.contactinfo.Name.value == "" )
{
alert ( "You need to fill the name field!" );
valid = false;
}
if ( document.contactinfo.email.value == "" )
{
alert ( "You need to fill in your email!" );
valid = false;
}
return valid;
}
, , . , , . JS script , , : ValidateRequiredFields is not defined
, . , .
? , , . !
. JQuery, , , !