summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/tests/RangeValidator.html
blob: 0dd3c283e5937addf37fd8fe19fa50c1d13f7e3d (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
	<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
	<meta http-equiv="Content-Style-Type" content="text/css" />
    <title>Prado Client-Side RangeValidator Tests</title>
<!-- base files -->
<script type="text/javascript" src="../../base.js"></script>
<script type="text/javascript" src="../../dom.js"></script>
<script type="text/javascript" src="../prado/validation.js"></script>
<script type="text/javascript" src="../prado/validators.js"></script>
<style type="text/css">
/*<![CDATA[*/

	.message
	{
		color: red;
	}
	.required, .required1, .required2
	{
		border: 1px solid red;
	}
/*]]>*/
</style>
  </head>

  <body>
    <h1>Prado Client-Side RangeValidator Tests</h1>

<form id="form1" action="#">
	
<!-- group 1 -->
<div>
	<input type="text" id="text1" name="text1" />
	<span id="validator1" class="message" style="display:none">Numbers between 1 and 4</span>
	<input type="submit" value="Test" id="submit1" />
</div>
	<script type="text/javascript">
	<!-- 
	/*]]>*/
		if(typeof(Prado) != "undefined" && typeof(Prado.Validation) != "undefined")
		{
			Prado.Validation.AddForm("form1");

			var val1 = {id : "validator1",
						controltovalidate : "text1",
						errormessage : "*",
						display : "Dynamic",						
						controlcssclass : "required2",
						minimumvalue : "1",
						maximumvalue : "4",
						type : "Integer"};
			new Prado.Validation(Prado.Validation.TRangeValidator, val1);
			Prado.Validation.AddTarget("submit1");
		}

	/*]]>*/
	//-->
	</script>
</form>

  </body>
</html>