Results 1 to 6 of 6

Thread: Edit Code for Captcha (open-source) help?

  1. #1
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Edit Code for Captcha (open-source) help?

    Hey guys,

    I've found a free open-source captcha to be employed in my registration form. However, I don't know how to implement the captcha's validation in my registration form itself!

    More info:
    My asp registration form used javascript for validation. Once the user has filled all the required fills and pressed the 'submit' button, the data will be inserted to the database. So how do I implement Captcha's validation on the form itself?

    This is the captcha's validation code the site gave me, they said it's to be entered into another .asp page which I don't want:
    -----------------------
    strCAPTCHA = Trim(Request.Form("strCAPTCHA"))
    if strCAPTCHA = Trim(Session("CAPTCHA_" & Session.SessionID)) then
    else
    ErrorMessage = ErrorMessage & Server.URLEncode("You did not type in the verification info correctly.\n\n")
    End If
    -----------------------

    Here's the official site and the 'how-to' section:
    TipsTricks

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You don't. ASP is server-side: it isn't part of the frontend (in this case the form). You need to make it part of your server-side validation script, on the page to which the form submits.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hmm... ok, thanks for the reply~

    Ouch!
    Then is there a way to convert the 'errormessage' to something like Javascript's "return false"?

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No. It's possible to do something with XMLHttpRequest. Are you using this already, or do you have duplicate code on the front- and back-ends?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No, I have not used it yet.

    May I know what is it and how to use it?

  6. #6
    Join Date
    Oct 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Oh wait, I've already found a solution.

    Thanks!

Bookmarks

Posting Permissions

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