summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/active-controls/protected/pages/CallbackOptionsTest.page
blob: 5adc646f5f06b8e99a0255a211a2a69406bef4de (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
<com:TContent ID="Content">
	<h1>TCallbackOptions Test</h1>

	<com:TCallbackOptions ID="options1">
		<prop:ClientSide.OnLoading>
			$("#status").show();
		</prop:ClientSide.OnLoading>
		<prop:ClientSide.OnComplete>
			$("#status").hide();
		</prop:ClientSide.OnComplete>
		<prop:ClientSide.OnSuccess>
			$("#label1").html("Button 1 has returned");
		</prop:ClientSide.OnSuccess>
	</com:TCallbackOptions>

	<com:TActiveButton id="button1" Text="Button 1" ActiveControl.CallbackOptions="options1" />
	<com:TActiveButton id="button2" Text="Button 2" ActiveControl.CallbackOptions="options1">
		<prop:ClientSide.OnSuccess>
			$("#label2").html("Button 2 has returned");
		</prop:ClientSide.OnSuccess>
	</com:TActiveButton>
	<com:TActiveButton id="button3" Text="Button 3">
		<prop:ClientSide.OnSuccess>
			$("#label3").html("Button 3 has returned");
		</prop:ClientSide.OnSuccess>
	</com:TActiveButton>

	<div id="label1">Label 1</div>
	<div id="label2">Label 2</div>
	<div id="label3">Label 3</div>
	<div id="status" style="display:none; background-color: #c00; color:white; text-align:center; padding: 1em" >
		Loading...
	</div>
</com:TContent>