- Archived
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 … (read more)
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.