Hi,
I try to set the focus back to a field on which user enter an invalid value, but it doesn't work. Can anyone help??? Thanks. Here is my code :
Function Validate()
dim item
set myform=document.forms("frmCSB"
For each item in document.forms(0)
ITname=item.name
Suffix=right(item.name,2)
if Suffix = "MM" then
if not IsNumeric(item.value) then
msgbox "Please enter a number between 1 and 12."
myform.item.name.focus <=== set focus to field
.............................
I try to set the focus back to a field on which user enter an invalid value, but it doesn't work. Can anyone help??? Thanks. Here is my code :
Function Validate()
dim item
set myform=document.forms("frmCSB"
For each item in document.forms(0)
ITname=item.name
Suffix=right(item.name,2)
if Suffix = "MM" then
if not IsNumeric(item.value) then
msgbox "Please enter a number between 1 and 12."
myform.item.name.focus <=== set focus to field
.............................