document.write('<scr'+'ipt type="text/javascript" s'+'rc="' + RecaptchaState.server + 'js/recaptcha.js"></scr'+'ipt>');
I get this error on firefox (v.19.0.2) with html5:
Ignored call to document.write() from an external script loaded asyncronouslly.
[...]
Even if I try to download straight (<script type="text/javascript" src="https://api-secure.recaptcha.net/js/recaptcha.js"></script>)
I get the same error at recaptcha.js (line 119)
Never call document.write() from an async script. In Gecko 1.9.2, calling document.write() has an unpredictable effect. In Gecko 2.0, calling document.write() from an async script has no effect (other than printing a warning to the error console).
Finally solved by using AJAX API, this way:
<div id="divRecaptcha"></div>
<script type="text/javascript">
$.getScript("https://www.google.com/recaptcha/api/js/recaptcha_ajax.js", function() {
Recaptcha.create("XXXXXpublicKeyXXXXXX", "divRecaptcha", {
theme: "white"
});
});
</script>