i written a java script which allows only numbers,comma,dot. i applied it on four text boxes. my issue is i have 10 text boxes which takes different types of data on which four of them i applied java script. i can use tab key on other text boxes but i am not able to use on java script applied text boxes to move courser. is there any change that i have to do in my script... Thanks.
Java Script:-
function isNumberCommaDot(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode(key); if (key.length == 0) return; var regex = /^[0-9,\9\b]*\.?[0-9]*$/; if (!regex.test(key)) { theEvent.returnValue = false; if (theEvent.preventDefault) theEvent.preventDefault(); } } i used \9 in regex but still its not accepting tab key.(9 is ASCII char. for TAB Key)