This is a discussion on "by clicking on a dynamically generated button how can i delete a dynamictext box" within the JavaScript Forum section. This forum, and the thread "by clicking on a dynamically generated button how can i delete a dynamictext box are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
by clicking on a dynamically generated button how can i delete a dynamictext box
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
how can i write code for "remove textarea" in the following code?
<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(bu t); } </script> </head> <body> <input name="Input" type=button onclick="genBox('boxhold1')" value="insert textarea" /> <div id="boxhold1"></div> </body> </html> |
|
|
|
|||
|
Re: by clicking on a dynamically generated button how can i delete a dynamictext box
You can assign a removal function to the button at its time of construction just the same as you are already assigning other attributes.
|
![]() |
| Tags |
| clicking on button, delete textarea, javascript |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to stop the browser refresh on clicking the webbrowser's refresh button ? | camarun20 | JavaScript Forum | 3 | Mar 18th, 2008 23:04 |
| FLASH - validating input fields if empty before clicking submit button | kyutkb | Flash & Multimedia Forum | 3 | Jul 24th, 2007 15:38 |
| Editing and Delete problem Dynamically | ScorpionKing | JavaScript Forum | 1 | Jun 29th, 2007 13:21 |
| Problem opening page in dynamically generated iframe | Malkalypse | JavaScript Forum | 3 | Jun 20th, 2005 20:38 |
| Delete All Row (Select All Row Using Radio Button) | Monie | Classic ASP | 37 | Nov 5th, 2004 09:21 |