开发者

jquery recaptcha php

I don't know how can i validate the recaptcha thing via jQuery. Please help. I have the contact us form with the following fields:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.validate.js"></script>


<script type="text/javascript">

$(document).ready(function() {

$('#signup').validate({
ru开发者_开发技巧les: {
name: {
required: true
},
email: {
required: true,
email: true
},
messages: {
name: {
required: 'FULL NAME Missing'
},
email: {
required: "E-MAIL ADDRESS Missing",
email: "E-MAIL ADDRESS Not Valid"
}

});



});


</script>

<form action="index.php" method="post" name="signup" id="signup">
<p>
Full Name
<br>
<input name="name" type="text" class="required" id="name" title="Type your Full Name into this box" value="<?php echo $_POST['name']; ?>">
</p>
<p>
E-Mail Address
<br>
<input name="email" type="text" id="email" title="Type your E-Mail Address into this box" value="<?php echo $_POST['email']; ?>">


</form>

Validation with the jQuery is working, but no idea how to implement the recaptcha into this.


thanks all for your comments,will get it done by simple library :)

http://www.white-hat-web-design.co.uk/articles/php-captcha.php

And validation by using php after submitting of the form (it was easy for me to implement in less time in php than jquery. :) .

special thanks to Felix Kling :).

Dave


For those sort of validate, there is a validation method in jQuery validate plugin known as remote.

Check it here

$("#myform").validate({
  rules: {
    email: {
      required: true,
      email: true,
      remote: "check-email.php"
    }
  }
});

In this check-email.php should return string "true" to be considered valid. and string "false" to be considered false.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜