ClanKiller.com http://forums.clankiller.com/ |
|
javascript resize textarea http://forums.clankiller.com/viewtopic.php?f=24&t=2927 |
Page 1 of 1 |
Author: | Satis [ Mon Sep 29, 2008 1:24 pm ] | ||||||||||||||||||
Post subject: | javascript resize textarea | ||||||||||||||||||
I found this online here: http://tuckey.org/textareasizer/ Basically I was looking for something that would automatically resize a textbox to match the text inside of it. The application was for a web app where the text could be of virtually any size and it had to be user-editable through the web page. I took the javascript referenced above and made some minor changes. inline on the textarea
then the javascript functions
The biggest drawback is that you have to define a cols property on the textarea. I'd recently been using style='width: 100%;' to just make it automatically resize to the area it's in, but that doesn't work here. Still, it's very handy. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |