I've written some validation routines that take a form field as a parameter.
I want to adapt the routines so that they can take either form fields OR strings. I therefore need to be able to test for the parameter's type because if it's a field I'll use ParamName.value to get the value, where...
I have a function as follows:
function checkComplete(checkField)
{
alert(checkField.value);
if(checkField.value=="")
{
alert("You have not completed the field");
checkField.focus();
checkField.select();
return false;
}
else
{
return true...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.