rlmEEna Posted May 19, 2006 Share Posted May 19, 2006 Please look at http://xma.no/tinymce-editor-textarea2.gifThis will not happend? no scroll bars will appear? I dont need any scroll bar.how to do. Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 19, 2006 Share Posted May 19, 2006 Don't you want scrollbars? Like the colls="" and the rows="" as a maximum of characters?Then add maxlength="" for the maximum of chars, while cols and rows only define the initial width and height of the textarea Link to comment Share on other sites More sharing options...
aspnetguy Posted May 19, 2006 Share Posted May 19, 2006 Don't you want scrollbars? Like the colls="" and the rows="" as a maximum of characters?Then add maxlength="" for the maximum of chars, while cols and rows only define the initial width and height of the textarea <{POST_SNAPBACK}> Actuall textarea does not support maxlength.You can do it with javascript like this thoJSfunction maxLength(object,maxLength){ return (object.value.length <= maxLength);} ThenHTML <textarea id="myTA" onkeypress="return maxLength(this,15)"></textarea> Replace 15 witht he max length you want. Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 19, 2006 Share Posted May 19, 2006 You're right, sorry I forgot There is no maxlength for the textarea, that does is available for every input Link to comment Share on other sites More sharing options...
rlmEEna Posted May 20, 2006 Author Share Posted May 20, 2006 hmm aspnetguy,okey but its not working perfectly. if i put max length of 1000 chars in javascript and width of text box as 50 chars now i put a word with 51 chars then it will show the horizontal scroll.any guess ? Link to comment Share on other sites More sharing options...
pulpfiction Posted May 22, 2006 Share Posted May 22, 2006 I guess you can use the text Wrap to avoid the horizontal scrollbar. try "wrap=hard" in this <textarea id="myTA" onkeypress="return maxLength(this,15)"></textarea> Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 22, 2006 Share Posted May 22, 2006 Remember wrap is not W3C standard, and may not work in all browsers Link to comment Share on other sites More sharing options...
pulpfiction Posted May 22, 2006 Share Posted May 22, 2006 hmm aspnetguy,okey but its not working perfectly. if i put max length of 1000 chars in javascript and width of text box as 50 chars now i put a word with 51 chars then it will show the horizontal scroll.any guess ?<{POST_SNAPBACK}> Like Dan said, If you set the cols=50, then it should not show any horizontal scrollbar... did u try this... Link to comment Share on other sites More sharing options...
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