Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Location
    India
    Posts
    56

    Unanswered: How to validate data in form

    Dear friends,

    How to validae the data from a form before storing in db. Here I am using following code to find the blank fields
    but it is not working

    Please help me in issue

    function isdata(data)

    if data=" " then

    MsgBox "Please Enter the Field"

    else

    end if

    end function


    graceson

  2. #2
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    try out this JAVASCRIPT


    function field_isempty(str)
    {
    if (str.length==0)
    return(true)
    else
    return(false)
    }

  3. #3
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Here are some client-side validation resources:

    Javascript Field Validations -- Client Side Scripting by Nannette Thacker - 8/19/1999
    http://www.shiningstar.net/articles/...ions.asp?ID=AW

    Form Validation Using Javascript - 9/19/1998
    http://www.4guysfromrolla.com/webtech/091998-1.shtml
    Good tips such as saving JavaScript functions in a file called DataValidation.js and including this in pages that need this.
    JavaScript functions.

    WebDaily: Your daily source for Web Technology Tips and Tricks! - 10/27/1998
    http://www.4guysfromrolla.com/webtech/102798-1.shtml
    Just checks if fields filled in.

    Form Validation Scripts
    http://www.coolnerds.com/jscript/formval.htm

    Try This
    chunky - 5/14/2001 1:51:12 AM
    http://www.aspmessageboard.com/forum...12975&P=1&F=20
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

  4. #4
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    And here are some server-side validation resources:

    Server-Side Form Validation by Dianna Leech - 12/1/1999
    http://www.4guysfromrolla.com/webtech/120199-1.shtml

    An Email Validation Routine by Joo Vieira - 4/11/1999
    http://www.4guysfromrolla.com/webtech/041199-1.shtml
    Somewhat shorter.

    An Email Validation Script by Ben Durbin - 5/19/1999
    http://www.4guysfromrolla.com/webtech/051999-1.shtml
    Longer.

    Form Handler: Some light form validation and error notification.
    http://www.asp101.com/samples/form_handler.asp
    Uses function to loop thru all fields in a form.
    Also shows Response.Write using double double quotes:
    Response.Write "<IMG SRC=""../images/check.gif"" BORDER=""0"" WIDTH=""25"" HEIGHT=""25"">"

    ASP/Jscript Email Validation - 5/28/1999
    http://www.4guysfromrolla.com/webtech/052899-1.shtml
    Uses JavaScript run at the server.

    Form to DB: Insert records retrieved from a form into a database
    http://www.asp101.com/samples/form_to_db.asp
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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