summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected/pages/ActiveControls/Calculator2.page
blob: ca141c6000b2d99b462721d53568ac768ffc8632 (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">
	<h1>Callback Enabled Calculator 2</h1>
	<com:TTextBox id="a" />
	+
	<com:TTextBox id="b" />
	=
	<com:TActivePanel id="panel1">
		<com:TTextBox id="c" />
	</com:TActivePanel>
	
	<com:TButton id="sum" onclick="do_sum" text="Calculate!" />
	
	<com:TRequiredFieldValidator 
			ControlToValidate="a"
			ErrorMessage="left summand is required."
			ControlCssClass="required"
			Display="None" />
	<com:TRequiredFieldValidator
			ControlToValidate="b"
			ErrorMessage="right summand is requied."
			ControlCssClass="required"
			Display="None" />

	<div class="summarybox">
		<com:TValidationSummary
			ID="summary"
			HeaderText="Unable to calculate because" />
	</div>
	
	<com:TCallback ID="callback1" OnCallback="update_callback" />
	
	<script>
		$("<%= $this->sum->ClientID %>").onclick = function(event)
		{
			<%= $this->callback1->ActiveControl->Javascript %>
			return false;
		};
	</script>

</com:TContent>