Firefox don't recognize the maxlenght in asp textbox
Greetings, I have developed a asp.net web page has an asp textbox control with the property maxlenght = 2, but when tested with firefox 5.0 on the Samsung Galaxy Tab and enter data, lets you enter more than 2 characters.
So can validate the textbox with a javascript function in onkeypress event of the control.
Below detail the function
acceptNum function (evt) {
charCode var = (evt.which)? evt.which: event.keyCode if (charCode> 31 & & (charCode <48 | | charCode> 57)) return false;
return true;
}
Please help.
All Replies (1)
Thanks for the bug report. Can you let us know which keyboard you are using (for example, Swype, SwiftKey, or Samsung Keypad)?
With keyboards that provide suggestions, Firefox may show more than 2 characters while you are still composing a word, but it should cut off any extra characters as soon as you complete the word or move on to the next field.