codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Resizing textarea dynamically  PGSloboda at 17:37 on Monday, October 13, 2003
 

Hi all.

Is there a way to dynamically resize a textarea element (ie. add rows as the number of lines in the textarea increases)?

Thanks to all for any help rendered.

Paul Sloboda

  Re: Resizing textarea dynamically  Jeff Anderson at 19:30 on Wednesday, October 15, 2003
 

Hi
The following code should give you a start - click the button to expand the size of the area. I'm not aware of an event that checks for the end of a line in the textarea so what you're really after could be impossible I think - but will let you know if I find anything. Here's the code:


<script language=javascript>
function resize()
{

document.form1.ta.style.height='200px'
}
</script>
<form name=form1>
<textarea style="height:100px" name=ta></textarea>
</form>
<input type=button onclick=javascript:resize()>










CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: Date validation
•  Moncler Outlet For Sale Cheap Moncler Jackets & Cheap Moncler Coats & Moncler Vests
•  Wholesale Cheap Gucci Shoes Gucci Sneakers Gucci Handbags Gucci Backpack
•  Re: Why Use Method?
•  Re: doubt in asp.net
•  Re: calling C# from javascript
•  China Cheap Shoes Store Sale Cheap Air Jordans Shoes, Cheap Jordans, Cheap Nike Shoes & Nike Sneakers
•  "The best Method Along with Golf suggestions
•  What is the important of coding standard?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012