~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to wiki/htdocs/applets/FCKeditor/editor/dialog/common/fcknumericfield.htc

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

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