RabbieBurns Posted September 24, 2008 Posted September 24, 2008 Im using a textbox to insert the text into an access database. The field in the database is set to "memo", and as far as I can see there isnt the same way of limiting the length of a memo filed as there is a text field. So I am wanting to set a limit on the textbox. I cant seem to see a way of doing it without using a javascript addon. (NB: I can limit it for a but cant seem to for a )
powdarrmonkey Posted September 24, 2008 Posted September 24, 2008 Nope, there is no native way of limiting a textarea's volume, only it's display size. 1
RabbieBurns Posted September 24, 2008 Author Posted September 24, 2008 Thanks. Javascript it is then.
webman Posted September 24, 2008 Posted September 24, 2008 Thanks. Javascript it is then. What if the user disables javascript?
RabbieBurns Posted September 24, 2008 Author Posted September 24, 2008 hmm interesting. What would you suggest? Its the teachers who've requested this feature anyway so if they're gonna go disableing jave (im not sure many of them would even know how ;p) then they are just not going to know how much they have to type. Ive actually made my text area the exact size of the allowed text to give them an idea of how much to type as well.
webman Posted September 24, 2008 Posted September 24, 2008 In conjunction with the existing, I would just use server-side validation to limit the length that is then sent to the database.
powdarrmonkey Posted September 24, 2008 Posted September 24, 2008 Agreed. You still need to enforce it at the destination anyway, because you can't trust the browser to play nicely in any circumstances.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now