V
vindictive27
Hello,
I'm trying to use a VB script inside of an ASP/HTML form I've created
for an internal business website. I'm just using some standard if ...
then statements to verify if all required fields have information, and
if so, to go ahead and submit the form. If the fields do not have the
required information, I am displaying a message box notifying the user
that the field must be filled in to allow submission. This works for
all fields, except the last few on the form. Here is the code I have:
If (document.MyForm.Radio9.checked) then
if (document.MyForm.Answer16a.value)="" then
if (document.MyForm.Answer16b.value)="" then
MsgBox("The More Information field
is required")
validation=false
end if
end if
else if not(document.MyForm.Radio10.checked) then
MsgBox("The More Information field is
required")
validation=false
else if (document.MyForm.Radio10.checked) then
validation=true
End If
Now, what happens is, it totally ignores that code -- and it submits
the form anyway, totally ignoring all of the other code for verifying
fields that worked previous to adding that bit.
Any ideas? Any other boards I should post in?
Thank you.
I'm trying to use a VB script inside of an ASP/HTML form I've created
for an internal business website. I'm just using some standard if ...
then statements to verify if all required fields have information, and
if so, to go ahead and submit the form. If the fields do not have the
required information, I am displaying a message box notifying the user
that the field must be filled in to allow submission. This works for
all fields, except the last few on the form. Here is the code I have:
If (document.MyForm.Radio9.checked) then
if (document.MyForm.Answer16a.value)="" then
if (document.MyForm.Answer16b.value)="" then
MsgBox("The More Information field
is required")
validation=false
end if
end if
else if not(document.MyForm.Radio10.checked) then
MsgBox("The More Information field is
required")
validation=false
else if (document.MyForm.Radio10.checked) then
validation=true
End If
Now, what happens is, it totally ignores that code -- and it submits
the form anyway, totally ignoring all of the other code for verifying
fields that worked previous to adding that bit.
Any ideas? Any other boards I should post in?
Thank you.