dear all,
i'm trying to implement the captcha in a form where i'm using jquery
validation and also custom validation methods.
this is the code i have so far:

jQuery.validator.addMethod("Captcha", Function(value, element) {
           jQuery.get("/functions/app/CaptchaAjax/captcha.asp?
validateCaptchaCode=" +  jQuery("#captchacode").val() + "", function
(data){
        if (data == 1)
        return true;
        });
        return this.required(element) || true;
});

the problem i have so far is that: if i get out from the jQuery.get
function then i will loose the variable data and if i put the return
this.required(element) || true; then i will get an error because the
addmethod function needs it.

is there i work around this? or may be another way to do it?

Thanks

Reply via email to