I have a form that uses reCAPTCHA. For some reason, when the user submits this form with the wrong re-capture value, when the page is re-displayed, re-assembly is not displayed.
It seems that this is happening, because the second attempt tries to inject the "tag" tag and sporadically (and only in certain browsers, certain environments and in certain scripts) does not add that the "script" in the DOM.
This happens as follows:
1) There is inline javascript inline in the form, which looks like this:
https://www.google.com/recaptcha/api/challenge?k=<our public key>
2) That the script runs correctly and returns the following:
var RecaptchaState = {
site : <some value>,
challenge : <challenge key>,
is_incorrect : false,
programming_error : '',
error_message : '',
server : 'https://www.google.com/recaptcha/api/',
timeout : 18000
};
document.write('<scr'+'ipt type="text/javascript" s'+'rc="' + RecaptchaState.server + 'js/recaptcha.js"></scr'+'ipt>');
3) , , , script , recaptcha.js, RecaptchaState, recaptcha, .
- script, 2) DOM, recaptcha.js , recaptcha ! , , "RecaptchaState" , script, .
, , , . Firefox, , , . , , , . , , . , , , , . .
, , , , js, document.write. , - javascript - . , , , , , , , .
- . , ... firebug, , - , - . - , , , Firefox? - "Speed-Tracer" Chrome, . ,
Chrome.