Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2009
    Posts
    50
    Thanks
    19
    Thanked 0 Times in 0 Posts

    less than or equal to 7 characters

    ive done this before but i cant for the life of me remember how to do it. Its something super simple i know that but what i need is
    when a text box passes a variable from a form to another page it has to be more than 7 characters whether it be numbers or letters or symbols right now i have

    Code:
    textbox = request.form("textbox")
    if textbox <= 7 then
    response.write "testing its more than 7 characters"
    else
    response.write "its less than 7 characters"
    end if
    the problem i have is it only accepts numbers less than 7 and no letters or symbols else it errors out.
    can someone help me out?

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,118
    Thanks
    80
    Thanked 4,555 Times in 4,519 Posts
    If LEN(textbox) <= 7 Then
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    nvysel24 (03-19-2010)


  •  

    Posting Permissions

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