KrazyKid
01-29-2003, 07:39 PM
Hello All,
I want to do something that I am sure is simple, I just can't fathom it at the moment..
Objective:
Pass the object value to a function along with the object property of formname.objectname to null out the text if the condition is met. eg: strObjName.value = ''; strObjName.focus();
Example usage below:
Calling Syntax:
checkTxtField(this.name, this.value);
function checkTxtField(strObjName,strToCheck)
{
if (strToCheck == "some text")
{
alert(strObjName + ': ' + strToCheck)
}
}
Thanks to all that respond!
I want to do something that I am sure is simple, I just can't fathom it at the moment..
Objective:
Pass the object value to a function along with the object property of formname.objectname to null out the text if the condition is met. eg: strObjName.value = ''; strObjName.focus();
Example usage below:
Calling Syntax:
checkTxtField(this.name, this.value);
function checkTxtField(strObjName,strToCheck)
{
if (strToCheck == "some text")
{
alert(strObjName + ': ' + strToCheck)
}
}
Thanks to all that respond!