1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Rep Power

    Validation routines not working correctly


    I am using VBScript and not ASP, I hope that it is ok to post in this section of the forum.

    I have created a webform which consists of fields such as Firstname, Surname and phonenumber. I have written three validation routines. These check that the fields are not blank, the first and surname fields contain letters only and that the phone number field contains only numbers.

    When a user successfully enters data he/she receives a confirmation message however when the user enters e.g. letters in the phone numebr field he/she receives an error message.

    I am having two main problems:

    1. When the form is tested the appropriate validations checks are carried out successfully and the form, I think is being sent to the server. I say I think because when I check the database on the server, the details from the form are not present.

    2. When an error is made on the web form e.g. letters are entered into the phonenumber field, the correct error messages appears, however the form data is posted to the server. I checked the database and it contains the data from the form.

    If data has been correctly entere dinto the form I would like the data from the form to be posted to the server. When there are errors I do not want the form data to be posted to the server.

    I am sorry for the length of the post. I haven't got a clue why the form is behaving like this.

    Does any one have any suggesstions as to how this can be resolved please?.

    Thank You

    There is also a Submit button on the form which sends the webform to the serve
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Rep Power
    Do some googling for things like "how to debug asp"

    Most of what you seem to be asking is client-side javascript stuff for form validation.
    Doug G
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo