You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
547 B
28 lines
547 B
2 years ago
|
$(function(){
|
||
|
$("body").on("click", "#refreshimg", function(){
|
||
|
$.post("newsession.php");
|
||
|
$("#captchaimage").load("image_req.php");
|
||
|
return false;
|
||
|
});
|
||
|
|
||
|
$("#captchaform").validate({
|
||
|
rules: {
|
||
|
captcha: {
|
||
|
required: true,
|
||
|
remote: "process.php"
|
||
|
}
|
||
|
},
|
||
|
messages: {
|
||
|
captcha: "Correct captcha is required. Click the captcha to generate a new one"
|
||
|
},
|
||
|
submitHandler: function() {
|
||
|
alert("Correct captcha!");
|
||
|
},
|
||
|
success: function(label) {
|
||
|
label.addClass("valid").text("Valid captcha!")
|
||
|
},
|
||
|
onkeyup: false
|
||
|
});
|
||
|
|
||
|
});
|