CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 This is cool - enlarging textareas

Print topic Send  topic

Author Message
DonB
Posted: 12/11/2003, 9:54 AM

I have always hated the TEXTAREA. Takes up a lot of space and if you shrink
'em so wveryting fits, then they are hard to edit.

Here's something to try (found at subsimple.com/bookmarklets) - a bit of
javascript you can add to the TEXTAREA (I happened to use the ondblclick);

ondblclick="javascript:function resizeTextArea(wndw){var
areas=wndw.document.getElementsByTagName('textarea');for(var
i=0;i<areas.length;i++){void(areas.cols*=3);void(areas.rows*=3);}}void
(frms=window.frames);if(frms.length==0){resizeTextArea(window);}else{for(var
i=0;i<frms.length;i++){resizeTextArea(frms);}}"

When you double-click in the textarea, it enlarges (my example enlarges 3x
both rows and cols). A nice touch, I think.
When you submit the form, things restore to their normal size.

If you have TEXTAREAs in grids, this is really handy because you can make
the TEXTAREA 1 row tall and it looks much nicer when you scroll through the
list.
--
DonB

http://www.gotodon.com/ccbth


Dave Rexel
Posted: 12/11/2003, 2:06 PM

Excellent Don,
Thanks for sharing, been trying to code this for a long time.
Dave

"DonB" <~ccbth~@gotodon.com> wrote in message
news:brab1j$88n$1@news.codecharge.com...
> I have always hated the TEXTAREA. Takes up a lot of space and if you
shrink
> 'em so wveryting fits, then they are hard to edit.
>
> Here's something to try (found at subsimple.com/bookmarklets) - a bit of
> javascript you can add to the TEXTAREA (I happened to use the ondblclick);
>
> ondblclick="javascript:function resizeTextArea(wndw){var
> areas=wndw.document.getElementsByTagName('textarea');for(var
>
i=0;i<areas.length;i++){void(areas.cols*=3);void(areas.rows*=3);}}void
>
(frms=window.frames);if(frms.length==0){resizeTextArea(window);}else{for(var
> i=0;i<frms.length;i++){resizeTextArea(frms);}}"
>
> When you double-click in the textarea, it enlarges (my example enlarges 3x
> both rows and cols). A nice touch, I think.
> When you submit the form, things restore to their normal size.
>
> If you have TEXTAREAs in grids, this is really handy because you can make
> the TEXTAREA 1 row tall and it looks much nicer when you scroll through
the
> list.
> --
> DonB
>
> http://www.gotodon.com/ccbth
>
>
>


   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.