Subversion Repositories Applications.papyrus

Rev

Rev 431 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 431 Rev 521
1
<public:component lightweight="true">
1
<public:component lightweight="true">
2
 
2
 
3
<script language="javascript">
3
<script language="javascript">
4
 
4
 
5
function CancelEvent()
5
function CheckIsDigit()
6
{
6
{
7
	var iCode = event.keyCode ;
7
	var iCode = event.keyCode ;
8
 
8
 
9
	event.returnValue =
9
	event.returnValue =
10
		(
10
		(
11
			( iCode >= 48 && iCode <= 57 )		// Numbers
11
			( iCode >= 48 && iCode <= 57 )		// Numbers
12
			|| (iCode >= 37 && iCode <= 40)		// Arrows
12
			|| (iCode >= 37 && iCode <= 40)		// Arrows
13
			|| iCode == 8						// Backspace
13
			|| iCode == 8						// Backspace
14
			|| iCode == 46						// Delete
14
			|| iCode == 46						// Delete
15
		) ;
15
		) ;
16
 
16
 
17
	return event.returnValue ;
17
	return event.returnValue ;
18
}
18
}
19
 
19
 
20
this.onkeypress = CheckIsDigit ;
20
this.onkeypress = CheckIsDigit ;
21
 
21
 
22
</script>
22
</script>
23
 
23
 
24
</public:component>
24
</public:component>