Thanks Dan, calling function from javascript worked well. But there is only one problem when i click on textarea the focus/cursor goes to any default location..not at start. Please tell me if u know any property for this.
Nikhil Khandelwal --- In [email protected], "Dan Powderhill" <[EMAIL PROTECTED]> wrote: > Use a bit of javascript in the onChange event. Something like this > (untested - may work, if not you get the idea) :- > > <script language="Javascript"> > function fnRestrictLength(iLength, sID) { > if (document.getElementById(sID).value.length > iLength) { > document.getElementById(sID).value = > document.getElementById(sID).value.substring(0,iLength); > } > } > </script> > > <textarea name="myTextArea" id="myTextArea" > onChange="fnRestrictLength(255,'myTextArea');"></textarea> > > Dan > ________________________________ > > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of Nikhil > Khandelwal > Sent: 18 April 2005 08:47 > To: [email protected] > Subject: [AspClassicAnyQuestionIsOk] Urgent !! a way to restrict input > in TEXTAREA!! > > > > > I want to restrict input in textarea upto some characters. In case of > TextBox, maxlenght is available. But for TextArea which property/ > method i should use to do so. Please tell me as soon as possible. > > > > > > > > > ________________________________ > > Yahoo! Groups Links > > > * To visit your group on the web, go to: > http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Un > subscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/> . Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
