robert_gsfame Posted November 27, 2009 Share Posted November 27, 2009 Is it possible to give a limitation (LINE) on textarea for eg: User can only create a paragraph or text within 10 line not more Can i do that?? thx Quote Link to comment Share on other sites More sharing options...
vinpkl Posted November 28, 2009 Share Posted November 28, 2009 you can use javascript to limit the words entered in textarea. vineet Quote Link to comment Share on other sites More sharing options...
Fuzzy Logic Posted November 28, 2009 Share Posted November 28, 2009 You can set max amount of characters entered. Add this to the head section. <script type="text/javascript"> /*********************************************** * Textarea Maxlength script- © Dynamic Drive (www.dynamicdrive.com) * This notice must stay intact for legal use. * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ function ismaxlength(obj){ var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : "" if (obj.getAttribute && obj.value.length>mlength) obj.value=obj.value.substring(0,mlength) } </script> <textarea maxlength="40" onkeyup="return ismaxlength(this)"></textarea> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.