view wiki/htdocs/applets/FCKeditor/editor/dialog/common/fcknumericfield.htc @ 0:77665d8e2254

tag of nonpublic@localhost--archive/moin--enterprise--1.5--base-0 (automatically generated log message) imported from: moin--main--1.5--base-0
author Thomas Waldmann <tw-public@gmx.de>
date Thu, 22 Sep 2005 15:09:50 +0000
parents
children
line wrap: on
line source
<public:component lightweight="true">

<script language="javascript">

function CheckIsDigit()
{
	var iCode = event.keyCode ;

	event.returnValue =
		(
			( iCode >= 48 && iCode <= 57 )		// Numbers
			|| (iCode >= 37 && iCode <= 40)		// Arrows
			|| iCode == 8						// Backspace
			|| iCode == 46						// Delete
		) ;

	return event.returnValue ;
}

this.onkeypress = CheckIsDigit ;

</script>

</public:component>