Login | |
|
 |
newbie stuck of form validation - 7/28/2004 3:53:51 AM
|
|
 |
|
| |
Encry
Posts: 5
Score: 0
Joined: 7/21/2004
From:
Status: offline
|
even though the conditions have been met to terminate the form submit the submit button does it anyway. Any help would be greatly appreciated. <SCRIPT language = "VBScript"> Function Submit_onclick dim validation dim header Header = "Application Submission" validation = true Call Check(Document.frmuserinformation.BankName.Value, "Please enter The Bank Name.") call Check(Document.frmuserinformation.[Bank Fax Number].Value, "Please enter Bank Fax Number.") Call Check(Document.frmuserinformation.[Bank Phone Number].Value, "Please enter Bank Phone Number.") Call Check(Document.frmuserinformation.[Fax Number for Stop Payments].Value, "Please enter Fax Number for Stop Payments.") Call Check(Document.frmuserinformation.[Bank Address].Value, "Please enter Bank Address.") Call Check(Document.frmuserinformation.Branches.Value, "Please enter Branches.") Call Check(Document.frmuserinformation.[Bank Website Address].Value, "Please enter Bank Website Address.") Call Check(Document.frmuserinformation.[Internet Banking Website].Value, "Please enter Internet Banking Website.") Call Check(Document.frmuserinformation.[Email Address].Value, "Please enter Email Address.") Call Check(Document.frmuserinformation.[Bank ABA#].Value, "Please enter Bank ABA#.") Call Check(Document.frmuserinformation.[DDA Account for Serv. Charge].Value, "Please enter DDA Account for Serv. Charge.") Call Check(Document.frmuserinformation.[Bank Tax Id#].Value, "Please enter Bank Tax Id#.") Call Check(Document.frmuserinformation.[ACH Destination ID#].Value, "Please enter ACH Destination ID#.") Call Check(Document.frmuserinformation.[ACH Originator ID#].Value, "Please enter ACH Originator ID#.") Call Check(Document.frmuserinformation.[ACH Destination Name].Value, "Please enter ACH Destination Name.") Call Check(Document.frmuserinformation.[ACH Originator Name].Value, "Please enter ACH Originator Name.") Call Check(Document.frmuserinformation.[ACH File Modifier].Value, "Please enter ACH File Modifier.") Call Check(Document.frmuserinformation.[ACH TaxID Prefix].Value, "Please enter ACH TaxID Prefix.") Call Check(Document.frmuserinformation.[ACH Fee].Value, "Please enter ACH Fee.") Call Check(Document.frmuserinformation.[Fee Per File].Value, "Please enter Fee Per File.") Call Check(Document.frmuserinformation.[Fee Per Transaction].Value, "Please enter Fee Per Transaction.") Call Check(Document.frmuserinformation.[Fee Per PreNote].Value, "Please enter Fee Per PreNote.") Call Check(Document.frmuserinformation.[# Of Free Files].Value, "Please enter # Of Free Files.") Call Check(Document.frmuserinformation.[# of Free Transactions].Value, "Please enter # of Free Transactions.") Call Check(Document.frmuserinformation.[# of Free PreNotes].Value, "Please enter # of Free PreNotes.") Call Check(Document.frmuserinformation.[Dimension Bank#].Value, "Please enter Dimension Bank#.") Call Check(Document.frmuserinformation.[Dimension Teller#].Value, "Please enter Dimension Teller#.") End Function Sub Check(ByVal FieldValue, ByVal message) If FieldValue = "" Then MsgBox message, 0, Header validation = false If validation = True Then frmUserInformation.submit Msgbox"Your Application will now be sent Via Email",0,"Form Submission" else msgbox"One of the data fields is incorrect" end if End If End Sub </script> <FORM id=Form1 name=frmUserInformation action=MAILTO:suzie@suzette.com method=post encType=text/plain> <INPUT id=Submit1 onclick=submit_onclick value="Submit Data" type= submit name="End of">
|
|
| |
|
|
|
|
|