Recaptcha.reload() Focus Issue

399 views
Skip to first unread message

KJDotts

unread,
Mar 4, 2009, 8:03:20 PM3/4/09
to reCAPTCHA
I am new to reCAPTCHA so please forgive me if the solution here is
obvious.

I have an AJAX form protected with reCAPTCHA and everything is working
perfectly except for one issue. If someone makes a mistake when
completing the form, my form validation displays help for all fields
with issues and puts the focus on the topmost field with an issue. My
problem is when I issue Recaptcha.reload() after the form refresh
(again, I am using AJAX) the focus switches from the field I have put
focus on via JavaScript to the reCAPTCHA field. In my JavaScript code
I have Recaptcha.reload() before the focus I apply but since reCAPTCHA
takes a second to load the new challenge image it still gets the
focus.

My questions are:

1. Is there anyway to tell the Recaptcha.reload() command to not
focus?
2. Perhaps I could use some JavaScript to determine when
Recaptcha.reload() has completed (maybe via an exit code) and apply my
focus then?

Could someone please offer a suggestion here?

Thank you for your time and attention!

reCAPTCHA Support

unread,
Mar 4, 2009, 8:21:43 PM3/4/09
to reca...@googlegroups.com
You should destroy the CAPTCHA and create a new one -- reload should only be called when the user requests a new CAPTCHA.

- Ben
--
reCAPTCHA: stop spam, read books
http://recaptcha.net

Shannon Thrasher

unread,
Jul 31, 2013, 2:50:44 PM7/31/13
to reca...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages