English 中文(简体)
Testing ReCaptcha Dynamically?
原标题:

I ve got recaptcha working in it s fundamental form - requiring a captcha code and displaying a basic error when it s wrong. But I want to make it more usable, and I d really appreciate your help.

Is there any way to ajaxically send a test/request to see if the captcha code is correct, and if it s not, pre-emptively prompt the user for another attempt?

Failing that possibility - is there any way to ensure that all the fields keep their values if I were to php redirect the user back to the form page?

Thanks!

最佳回答

reCAPTCHA has an AJAX API as described here.

You need to include the script in your page:

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

And then define a callback to fire when it gets the response:

Recaptcha.create("6LdIEwAA......",
  "recaptcha_div", {
  theme: "red",
  callback: Recaptcha.focus_response_field
});

There s a demo of it working here.

问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签