BillLumbergh
Programmer
Is there a Javascript function that simply checks to see if what I am referring to is an object on a web form? For example, the Javascript would be doing some client side validation of a web form that may or may not contain a checkbox. If the checkbox exists, I want to run some validation on it. What I am essentially looking for is a Javascript function that will do this:
if (IsObject(document.form.chkMyCheckbox))
{
// means for field exists
do this;
}
else
{
form field does not exist, do nothing
}
What is the means of performing the IsObject() call? I'm guessing this is pretty basic; I just don't know it. The search I ran did not find anything that looked too promising.
Thanks.
if (IsObject(document.form.chkMyCheckbox))
{
// means for field exists
do this;
}
else
{
form field does not exist, do nothing
}
What is the means of performing the IsObject() call? I'm guessing this is pretty basic; I just don't know it. The search I ran did not find anything that looked too promising.
Thanks.