Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Validation

Status
Not open for further replies.

ajra

Programmer
Aug 14, 2002
3
US
I have 3 radio buttons. Each radio btn has a set of related text boxes. If the radio btn is selected, the corresponding text boxes are required fields. This has to be done in FrontPage 2000 - employer requirement.

The other required fields on the form are always required and use FrontPage's built in validation. I have VBScript validation on the form, but it is not working. Please help me see what I am missing or doing wrong.

My form tag:
<form method=&quot;post&quot; action=&quot;thankyou.asp&quot; name=&quot;FrontPage_Form1&quot; onSubmit=&quot;return MyForm_OnSubmit(this)&quot;>

This is at the end of the validation code:
If validation = True Then
return true
Else
return false
End If
 
ajra,

I think you have some javascript entangled with your vbscript

<form method=&quot;post&quot; action=&quot;thankyou.asp&quot; name=&quot;FrontPage_Form1&quot;>

function FrontPage_Form1_onSubmit()
'----vbscript code here---

If not validation = True Then document.FontPage_Form1_OnSubmit = false
end function

good luck

tsmith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top