blob: 375ede759146a11a8939bd95293a9534c9a718ed (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
|
<com:TForm ID="form1">
<style>
.loader
{
position:absolute;
right:0px;
top:0px;
color:white;
background-color:#900;
padding: 0.5em 1em;
}
input.required
{
border: 1px solid red;
background-color: pink;
}
</style>
<h1>Callback Custom Validator Test</h1>
<com:TTextBox ID="text1" />
<com:TActiveCustomValidator
ControlToValidate="text1"
ErrorMessage="*"
ControlCssClass="required"
OnServerValidate="validate_text1">
<prop:ActiveControl.ClientSide
OnLoading="Element.show('loader')"
OnComplete="Element.hide('loader')" />
</com:TActiveCustomValidator>
<com:TButton Text="Submit" />
<span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>
<com:TJavascriptLogger />
</com:TForm>
|