By@
09-17-2005, 06:55 AM
Hey.
Im kinda new to JavaScripting but I cant seem to find the answer to this anywer.
I have a function which checks to see if a date is in the dd/mm/yyyy format in a certain field. If it returns false, it alerts the user and is supposed to focus back to that field.
function DateValid(myDate, fieldName) {
if (testDate(myDate) == false){
alert(reason);
document.form1.fieldName.select();
}
}
Except that the fieldName variable, which is sent from the field via onBlur(), seems to stop it working... I think.
Any ideas?
Im kinda new to JavaScripting but I cant seem to find the answer to this anywer.
I have a function which checks to see if a date is in the dd/mm/yyyy format in a certain field. If it returns false, it alerts the user and is supposed to focus back to that field.
function DateValid(myDate, fieldName) {
if (testDate(myDate) == false){
alert(reason);
document.form1.fieldName.select();
}
}
Except that the fieldName variable, which is sent from the field via onBlur(), seems to stop it working... I think.
Any ideas?