Solved

adding textarea on onclick

Posted on 2003-12-09
3
255 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
Comment Utility
<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
Comment Utility
Does that solve ur problem?
let us know if u have any other query
0
 

Author Comment

by:mathew189
Comment Utility
thanks
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

771 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now