asp validation

Results 1 to 3 of 3

Thread: asp validation

  1. #1
    trying to grow Guest

    Default asp validation

    I have been learning by using Front Page but I am trying to learn more and get away from the webbots used by Front Page. One of the things I would like to learn is how to make a field required to be filled in. The way Front Page does it if the field is required and the person doesn't fill it out and clicks submit it put's up an alert box stating that the field is required and takes the cursor to that field. Is there some code that I could look at to see how to learn to do that in asp?

  2. #2
    neils Guest

    Default RE: asp validation

    The best (quickest) way to do this is with client-side javascript. I think 4guys has some articles. Try doing a search for "Form Validation" and see what you come up with.

  3. #3
    Join Date
    Dec 1969

    Default Client side

    You&#039;re probably looking for client side validation to ensure that a field is filled in. Look in the Javascript FAQs for form validation. There&#039;s stuff all over the place. Bascially, it&#039;s something like this:<BR><BR>&#060;script language="javascript"&#062;<BR>function validate()<BR>{<BR>if(document.form.txtWhatvever.v alue=="")<BR>{<BR>alert("Please fill in the box");<BR>return false;<BR>}<BR>return true;<BR>}<BR>&#060;/script&#062;<BR><BR>&#060;form name="form1" onSubmit="return validate();"&#062;<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts