hjg
2024-07-09 30304784e82d4bba24121328da8eb8490aec4f4f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
$(function(){
    $("#refreshimg").click(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
    });
    
});