// //A funtion for check a charactor input in a web form // function checkIt(evt) { evt = (evt) ? evt : window.event var charCode = (evt.which) ? evt.which : evt.keyCode if ((charCode < 45 || charCode > 57) && charCode != 8 && charCode != 37 && charCode != 39) { alert("This field accepts numbers only") return false } return true } // // you can access it from any contorl as follows // onKeyPress = 'javascript:return checkIt(event)'
2 days ago
1 comments:
Ohh man, i think you hve spend too much time infront of PC. Hay common, wake up, Im going to use try catch, so that they will, never going to crash, at lest i have a control over that. :)
Post a Comment