Wednesday, 5 April 2017

why does google recapture show images when I want to use invisble

I'm brand new to recaptcha so I'm sorry if this question sounds stupid.

basically I put the button from google and the pictures show up after I click the button. I thought I was using invisble so I don't know why the pic showed up.

<button
class="g-recaptcha"
data-sitekey="6Le_shsUAAAAAKd8foaa82bmK6YchangeIBvX4BQY"
data-callback="onSubmit"
data-size = "invisible">
Submit
</button>

script

/*inside $(function(){}) so that is why I used window.on submit*/

window.onSubmit  =function onSubmit(token){
    grecaptcha.execute()
    // alert(grecaptcha.getResponse())
}

What I am trying to do is on submit button get info from page and send that info only if the user proves he is not a robot.

If you can't help me with that what data do I put in a post request if I need to put any for the recaptcha

window.onSubmit  =function onSubmit(token){
    // grecaptcha.execute()
    $.ajax({
        url : "/recaptcha",
        method : "POST",
        contentType : "application/json",
        data : ""
    })
    // alert(grecaptcha.getResponse())
}



via jack blank

No comments:

Post a Comment