summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/CallbackCustomValidatorTest.page
blob: 134e45cbe7c04992fe98257ef35b3dfcecd1bf43 (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
39
40
<com:TContent ID="Content">
<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:ClientSide
			OnValidationError="$('status').innerHTML='Error '+(new Date())"
			OnValidationSuccess="$('status').innerHTML='Success '+(new Date())"
			OnLoading="Element.show('loader')"
			OnComplete="Element.hide('loader')" />
	</com:TActiveCustomValidator>

	<span id="status"></span>

	<com:TButton Text="Submit" />

	<span id="loader" style="display:none;" onfocus="alert('ok')" class="loader">Loading...</span>

</com:TContent>