This is a discussion on "Editing and Delete problem Dynamically" within the JavaScript Forum section. This forum, and the thread "Editing and Delete problem Dynamically are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Editing and Delete problem Dynamically
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Editing and Delete problem Dynamically
Hi I am Scorp i have
Problem in Code i am unable to Correct it plz can anyone do correct it i cant Delete the selected Row infact i am generating the Rows Dynamically but it always delete the row from starting Node.. <html> <head> <script type="text/javascript"> function loadPoll_name_onclick(){ var loadpollnamerow = document.getElementById("pollId"); var loadpollname = document.getElementById("pollname").value; loadpollnamerow.innerHTML+="<div id='myDiv' style='border:1px solid #C0C0C0;'><span style='border:1px solid #C0C0C0;'><input type='button' value='Edit' ><input type='button' value='Delete' onclick='deletePoll_onclick()' /></span><span>" + loadpollname + "</span></div>"; } function editPoll_onclick(){ } function deletePoll_onclick(){ var d = document.getElementById("myDiv"); d.parentNode.removeChild(d); } function poll_name_onclick(){ } function display_poll_question(pollname){ var pollquestion = document.getElementById(pollname); pollquestion.style.display="block"; } </script> <style type="text/css"> a:link{ color: #333366; text-decoration: none; font-weight:bold; } a:visited{ color: #333366; text-decoration: none; font-weight:bold; } a:hover{ text-decoration: underline; color: #333366; font-weight:bold; } .poll{ border-style:solid; border-width:1px 1px 1px 1px; border-color: #C0C0C0; position:absolute; top:50px; left:30px; } </style> </head> <body> <div id="pollId" class="poll" > <div style="width:350px;border:1px solid #C0C0C0; background-color:#808080;"> <span style="color:#FFFFFF; font-weight:bold;">Poll</span> </div> <div> <b style="font-size:14px;">Poll Name :</b> <input type='text' name='name' id="pollname" /> <input type='button' name='name' value='Submit Poll' onclick="loadPoll_name_onclick('pollId')"> </div> <div style='border:1px solid #C0C0C0;'> <span style='border:1px solid #C0C0C0;'> <tr><td><input type='button' value='Edit'><input type='button' value='Delete'></td></tr> </span> <span > <a id="pollname1">Country</a> </span> </div> </div > </body> </html> |
|
|
![]() |
| Tags |
| problem |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS editing tools | danny322 | Web Page Design | 3 | Feb 1st, 2008 17:40 |
| Editing and Deleting Problem | ScorpionKing | Introduce Yourself | 2 | Jun 27th, 2007 19:07 |
| by clicking on a dynamically generated button how can i delete a dynamictext box | forjavascript | JavaScript Forum | 1 | Nov 20th, 2006 21:02 |
| Delete record problem | Gee Bee | Databases | 2 | Jan 4th, 2006 18:28 |
| Problem opening page in dynamically generated iframe | Malkalypse | JavaScript Forum | 3 | Jun 20th, 2005 20:38 |