|
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
|
|
|
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()>
|
|
|
|
|
|
|
|
|
|