Solved

adding textarea on onclick

Posted on 2003-12-09
3
259 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…

734 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