The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientCaptcha.Refresh Method

Refreshes the code displayed within the editor's challenge image.

Declaration

Refresh(): void

Remarks

To update image, the Refresh method sends a callback to the server, and rerenders an editor.

The Refresh method is useful to implement custom functionality when the refresh button is invisible.

Examples

The following part of the ASPxCaptcha - Custom Appearance online demo illustrates how to implement a captcha control with a custom appearance.

In this example, the control's Refresh Button.ASPxCaptcha and Text Box.ASPxCaptcha are hidden, and their functionaliry is implemented in a custom manner using separate controls (the IMG element, ASPxLabel, ASPxTextBox).

function GetRefreshButton() {
    return document.getElementById("refreshButton");
}        

function OnCaptchaBeginCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButtonAnimated.gif";
}

function OnCaptchaEndCallback(s, e) {
    var refreshButton = GetRefreshButton();
    refreshButton.src = "Images/refreshButton.gif"; 
    tbCode.SetValue("");
...   
}
See Also