A Runtime Error has occured,

I 'm getting a problem with some vbscript and html code.

I've got a form, but i want to validate it before being sent to a asp script.

Getting a runtime error?

Any ideas, or examples?



Has anybody got examples of a html form validation, then sending it to a asp script?

jonnygrantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

caraf_gCommented:
There are so many run time errors. Each caused by something completely different.

We need information, information, information.
0
jonnygrantAuthor Commented:
Edited text of question.
0
jonnygrantAuthor Commented:
Edited text of question.
0
jonnygrantAuthor Commented:
Edited text of question.
0
cable4096Commented:
I have a Form named FrontPage_Form1
on it there is an Input Type named place_call which is the button type not a submit type. If the values for the StartDate and EndDate text boxes on the form are empty, the form refuses to submit. If there is not text entered into NoticeText, the form refuses to submit.

This is due to a flag variable I named i_error which defaults to 0 as per my code, and then is set to 1 if there is a problem. At the end of the sub, you will note that if i_error is 0, the submit method is processessed, if not, it does not get run.



Sub place_call_OnClick
Dim i_error
Dim s_msg

i_error = 0

if Len(Document.FrontPage_Form1.StartDate.Value) = 0 Then
      MsgBox "You Must Enter Start Date.",64,"Missing Information"
      i_error = 1
end if
if Len(Document.FrontPage_Form1.EndDate.Value) = 0 Then
      MsgBox "You Must Enter End Date.",64,"Missing Information"
      i_error = 1
end if
if Len(Document.FrontPage_Form1.NoticeText.Value) = 0 Then
      MsgBox "You Must Enter Notice Text.",64,"Missing Information"
      i_error = 1
end if

If i_error = 0 then
            Document.FrontPage_Form1.Submit
End if
end sub
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.