C
Cheryl
I have a form with a drop-down list, and I'd like to set
up client-side validation so that the person has to select
something other than the first item, Select Department. I
don't want to use FrontPage's webbot validation. Can
someone suggest how to do this? I've tried:
Sub send_onclick
Dim MyForm
Set MyForm=FrontPage_Form1
if RTrim(MyForm.fldDepartment.Value)="" then
msgbox "Enter a Department in the Department field."
MyForm.fldDepartment.focus
Exit Sub
end if
MyForm.Submit
End Sub
But this doesn't work. The msgbox pops up whether or not
an item is selected.
I've also tried:
if RTrim(MyForm.fldDepartment.Value)="Select Department"
then
msgbox "Enter a Department in the Department field."
This doesn't work either.
Any suggestions? Thanks for your help.
up client-side validation so that the person has to select
something other than the first item, Select Department. I
don't want to use FrontPage's webbot validation. Can
someone suggest how to do this? I've tried:
Sub send_onclick
Dim MyForm
Set MyForm=FrontPage_Form1
if RTrim(MyForm.fldDepartment.Value)="" then
msgbox "Enter a Department in the Department field."
MyForm.fldDepartment.focus
Exit Sub
end if
MyForm.Submit
End Sub
But this doesn't work. The msgbox pops up whether or not
an item is selected.
I've also tried:
if RTrim(MyForm.fldDepartment.Value)="Select Department"
then
msgbox "Enter a Department in the Department field."
This doesn't work either.
Any suggestions? Thanks for your help.