Results 1 to 5 of 5

Thread: Validation

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    115
    if Request.Form("field") > 0...

    Or what are you looking for?

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You'll want to do this in client side javascript...

    The onBlur event will fire when the control loses focus and is one place to put it. Also in the onSubmit event of the form is another good place to validate fields.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

  3. #3
    CMangano
    Guest
    If you are using ASP, then you can easily validate it on the server. Just do:

    Code:
    If Len(Request.Form("yourfield")) > 0 Then
    'valid
    End If

  4. #4
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Interested in the onSubmit event. Not sure how to do it, have no clue about javascript..Would you be willing to help?

    Thanks

  5. #5
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    Code:
    <SCRIPT language=javascript>
    function myform_onSubmit()
    {
        if(myform.mytext.value < 0)
        {
            window.alert("Enter a value > 0");
            return false;
        }
        return true;
    }
    </SCRIPT>
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

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



Click Here to Expand Forum to Full Width