function validateForm() {
var dob = document.getElementById("usrDOB");
var usrEEID = document.getElementById("usrEEID");
var error = '';
if(usrEEID.indexOf("S")==-1)
{
$('#usrEEID').css('border', 'solid 2px red').focus();
error = "Make sure you include a capital \"S\" in the Employee ID field!";
}
if (!isValidDate(dob.value))
{
$('#usrDOB').css('border', 'solid 2px red').focus();
error = "Date of Birth must be in the format XX/XX/XXXX\n\r";
}
else
{
$('#usrDOB').css('border', '');
}
if (error.length > 0) {
alert(error);
return false;
}
return true;
}
ASKER
ASKER
jQuery (Core) is a cross-browser JavaScript library that provides abstractions for common client-side tasks such as Document Object Model (DOM) traversal, DOM manipulation, event handling, animation and Ajax. jQuery also provides a platform to create plugins that extend jQuery's capabilities beyond those already provided by the library.
TRUSTED BY
ASKER
I just deleted this question not realizing you had responded. I'll give the points just as a way to say, "Thank you" for your time.
I was able to figure it out. What I was lacking was this: var usrEEID = document.getElementById("u
The ".value" is what made all the difference.
Thanks for your help, though!