Checking reCAPTCHA with AJAX and then via form submission
69 views
Skip to first unread message
HarpuaFSB
unread,
Aug 1, 2011, 10:34:11 AM8/1/11
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to reCAPTCHA
Hey all,
I have reCAPTCHA working with my site just fine. I recently
implemented it in a comments section for non-registered users. The
comments section does some fancy stuff such as hiding and showing the
new comments/reply form.
The problem I am running into is that I need to verify the CAPTCHA
without submitting the form because I can't get the user back to where
they were if I reload the page due to how the page is structured.
So what I am doing is verifying the CAPTCHA through jQuery and AJAX.
I have all that working great but once the CAPTCHA is verified I
submit the form to the add comments PHP page where I would like to re-
verify the CAPTCHA but doing so it always comes back as invalid.
I'm guessing this behavior is by design as you can only verify the
"current" CAPTCHA once correct?
The way I have it setup now will stop spammers on the front-end but it
won't necessarily stop bots.
Is there anyway to check a CAPTCHA twice or go about this another way?