If you don't need it to resize on the fly and after each submit is good
enough you could try something like this.

<cfset UseCols = 35>
<cfset MinRows = 2>
<cfset MaxRows = 6>
<textarea name="Description" cols="#UseCols#"
rows="#numberformat(max(min((len(trim(Description))/UseCols)+1,#MaxRows#),#M
inRows#),'0')#">#trim(Description)#</textarea>

Which will keep your text area sized to it's contents between the limits.

--
Jay

> -----Original Message-----
> From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> Sent: 11 August 2004 01:16
> To: CF-Talk
> Subject: Re: Help with textarea
>
> Well the script works...
>
> though whoever published it seems to have a better handle on
> complex concepts than they do on simple concepts, like "var"
> ... they use var _outside_ the function where it's not needed
> and then don't use it _inside_ the function where it's
> absolutely necessary.
>
> Too bad they're putting that out there like that for people
> to cut and paste it...
>
> > this what you need?
> > http://www.felgall.com/jstip45.htm
>
> >   ----- Original Message -----
> >   From: Ciliotta, Mario
> >   To: CF-Talk
> >   Sent: Tuesday, August 10, 2004 3:55 PM
> >   Subject: SOT: Help with textarea
>
>
> >   Hi all.
>
> >   Is there a way to dynamically resize a textarea element
> >   (ie. add rows as the
> >   number of lines in the textarea increases)?
>
> >   My users only want one line in the form but as people
> >   type they what the
> >   textarea to expand automatically.
>
>
> >   I can do it to a text field but not the textarea.
>
>
> s. isaac dealey     954.927.5117
> new epoch : isn't it time for a change?
>
> add features without fixtures with
> the onTap open source framework
>
> http://www.sys-con.com/story/?storyid=44477&DE=1
> http://www.sys-con.com/story/?storyid=45569&DE=1
> http://www.fusiontap.com
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to