36 users online (2 members and 34 guests)  


  Results 1 to 2 of 2

Related

  1. add "human input" code to existing script    Forum: CGI Perl Forum
    Replies: 0
  2. Need a "Mark Forums Read" button    Forum: AHFB Feedback
    Replies: 3
  3. Code needed for "Basic Info" alteration    Forum: Myspace Forum
    Replies: 1
  4. Replies: 1
  5. Replies: 2
  1. #1
    forjavascript's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2006
    Posts
    2

    Question help me to write code for "remove textarea" button

    can you help me to write code for "remove textarea" button?
    <html>
    <head>
    <script language="javascript">
    function genBox(n)
    {
    var thebox = document.createElement('textarea');
    thebox.setAttribute('rows','10');
    thebox.setAttribute('cols','30');
    thebox.setAttribute('id','textBoxId');
    document.getElementById(n).appendChild(thebox);
    var but=document.createElement('input');
    but.setAttribute('type','button');
    but.setAttribute('value','remove textarea');
    but.setAttribute('name','remove');
    document.getElementById('boxhold1').appendChild(but);

    }
    </script>
    </head>
    <body>
    <input name="Input" type=button onclick="genBox('boxhold1')" value="insert textarea" />
    <div id="boxhold1"></div>
    </body>
    </html>

  2. #2
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732

    Re: help me to write code for "remove textarea" button

    Hi there forjavascript,

    and a warm welcome to these forums.
    Stone me mate you certainly get about, don't you. I have lost count of the forums on which you have posted this question.

    One solution - (amongst others) - to this problem, has been posted here ...



Tags for this Thread