Solved

adding textarea on onclick

Posted on 2003-12-09
3
257 Views
Last Modified: 2011-04-14
I need to give the user a button , whenever he/she clicks on it a new textarea is created. The user can add any no. of textarea's in this manner.
Plz suggest
0
Comment
Question by:mathew189
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
thomas908 earned 165 total points
ID: 9909841
<script type="text/javascript">
var TRCount =0;
var showCount=0;

function insRow()
{
    var x=document.getElementById('myTable').insertRow(TRCount)
    var y=x.insertCell(0)
    var z=x.insertCell(1)
    showCount = TRCount + 1
    y.innerHTML=showCount
    z.innerHTML="<TEXTAREA style=overflow:hidden NAME='task"+TRCount+"' ROWS='' COLS='45'></TEXTAREA>"
    TRCount++;
}
</script>
<table id="myTable">

</table>
<input type="button" onclick="insRow()" value="Insert">
0
 
LVL 8

Expert Comment

by:thomas908
ID: 9909854
Does that solve ur problem?
let us know if u have any other query
0
 

Author Comment

by:mathew189
ID: 9909879
thanks
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question