handler String|Function|Object

The URL, AJAX settings or function that fetches the image and id of the captcha. Called initially when no captcha and captchaId options are entered and when the Reset button is pressed. When used with function, call the args.success method with the source of the audio.

Example

<input id="captcha" />
<script>
    $("#captcha").kendoCaptcha({
        handler: function (args) {
            args.success({
                captcha: "captchaImage.png",
                captchaId: "1234"
            });
        }
    });
</script>

Example - ajax

<input id="captcha" />
<script>
    $("#captcha").kendoCaptcha({
        handler: "https://demos.telerik.com/kendo-ui/captcha/reset" // Response should return captcha and the captchaId
    });
</script>

Example - custom ajax settings

<input id="captcha" />
<script>
    $("#captcha").kendoCaptcha({
        handler: {
            url: "https://demos.telerik.com/kendo-ui/captcha/reset",
            data: {
                customfield: "data"
            },
            method: "POST"
        } // Response should return captcha and the captchaId
    });
</script>
In this article