Code Monkey home page Code Monkey logo

Comments (5)

greggilbert avatar greggilbert commented on June 24, 2024

Did it throw an error or anything? I need a bit more information as to what you're doing before I can look into this.

from recaptcha.

r-patrik avatar r-patrik commented on June 24, 2024

No. Only the captcha not shown. I think it's because of document.write in recaptcha javascript file,

document.write('<scr'+'ipt type="text/javascript" s'+'rc="' + RecaptchaState.server + 'js/recaptcha.js"></scr'+'ipt>');

I generate the html output at the server side and call your stuff there, and i send it back to the javascript and the html string in to a DOM element. Form appear well but the captcha not.

I get only this:

<script type="text/javascript" src="//www.google.com/recaptcha/api/challenge?k=6LfT5-wSAAAAAAbzIODG3RAKKcfZuyP4e5JfBz1p"></script>
<noscript>
    <iframe src="//www.google.com/recaptcha/api/noscript?k=6LfT5-wSAAAAAAbzIODG3RAKKcfZuyP4e5JfBz1p" height="300" width="500" frameborder="0"></iframe><br>
    <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
    <input type="hidden" name="recaptcha_response_field" value="manual_challenge">
</noscript>

from recaptcha.

greggilbert avatar greggilbert commented on June 24, 2024

I'm not really sure what would cause the form to render but not the image; it's all done with straight calls from Google. Are you trying to load it within an iframe? Maybe there's an issue with loading it within another iframe? I don't know how much I can help with this, as it doesn't seem to be an issue with this package per se.

from recaptcha.

elfif avatar elfif commented on June 24, 2024

Hi everyone
I had the same problem, but it doesn't really come from the package.
To display a reCaptcha on a form loaded via ajax , google wants you to use a totally different technique, involving a javascript library.

you wiil find details here : https://developers.google.com/recaptcha/docs/display?csw=1

@greggilbert maybe you should just warn user on your documentation that this library won't work if you load a form dynamically and add that link, it should help.

from recaptcha.

greggilbert avatar greggilbert commented on June 24, 2024

I've merged in your pull request on that. Thanks!

from recaptcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.