Validation of textbox control in a datagrid
-
hi , I use datagrid with textbox control.I need a javascript validation for the textbox that should allow numeric values with a single decimal point. Maximum numeric value it can allow is 999999.99999 Can ne body help ASAP Thanx in advance,
zari
function KeyCheck(e) { //With FireFox Support var KeyID = (window.event) ? event.keyCode : e.which; //a-z if((KeyID >= 65 && KeyID <= 90) || (KeyID >= 97 && KeyID <= 122) || (KeyID >= 33 && KeyID <= 47) || (KeyID >= 58 && KeyID <= 64) || (KeyID >= 91 && KeyID <= 96) || (KeyID >= 123 && KeyID <= 126) || (KeyID==32)) { return false; } return true; } and call this fn onkeypress="return KeyCheck(event);" like this
Sathya
-
function KeyCheck(e) { //With FireFox Support var KeyID = (window.event) ? event.keyCode : e.which; //a-z if((KeyID >= 65 && KeyID <= 90) || (KeyID >= 97 && KeyID <= 122) || (KeyID >= 33 && KeyID <= 47) || (KeyID >= 58 && KeyID <= 64) || (KeyID >= 91 && KeyID <= 96) || (KeyID >= 123 && KeyID <= 126) || (KeyID==32)) { return false; } return true; } and call this fn onkeypress="return KeyCheck(event);" like this
Sathya
-
It works fine with numbers... but it does not accept decimal point.I want to have only one decimal point.ne solution for this
zari
In that script itself check (.) Ascii value also
Sathya
-
In that script itself check (.) Ascii value also
Sathya