NuGet / PoliteCaptcha

PoliteCaptcha is a spam prevention library for use with ASP.NET MVC that attempts polite spam prevention first, before rudely presenting the user with a CAPTCHA.
Apache License 2.0
74 stars 13 forks source link

jQuery Ajax POST #10

Open fleed opened 11 years ago

fleed commented 11 years ago

Hi

Is it possible to add validation to a form submitted via jQuery Ajax post (without leaving the current page)? Are there examples?

Thanks

laedit commented 10 years ago

Hi,

I don't know if you are still trying to solve this but yes, it is possible: You just have to reference the ReCaptcha AJAX API script in your page:

<script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>

And call Recaptcha.Create(...) method if the return of your AJAX POST is wrong. More information: https://developers.google.com/recaptcha/docs/display