I'm doing something OBVIOUSLY wrong here, but for the life of me can't see what it is!
Won't bore you with the rest, the <input> tags are in a <form>, but just getting an "Object Expected" error when it hits the JavaScript!
function validateForm() {
if (isEmpty(document.forms[0].txtName.value) == true)
{
alert("Please Tell us your name.");
document.forms[0].txtName.focus();
return (false);
}
<input id="txtName" type="text" name="txtName" />
<input id="Submit" type="button" value="submit" onclick="validateForm();" />
Won't bore you with the rest, the <input> tags are in a <form>, but just getting an "Object Expected" error when it hits the JavaScript!