delete a row in html table using a hidden type and javascript
        Posted  
        
            by kawtousse
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by kawtousse
        
        
        
        Published on 2010-05-21T14:19:04Z
        Indexed on 
            2010/05/21
            14:30 UTC
        
        
        Read the original article
        Hit count: 202
        
JavaScript
Hi, I have a table with HTML constructed using my servlet class. When trying to delete a row in this table using a javascript function I must first of all put different id to separate elements.and i resolove it with hidden type like that:
retour.append("<td>");
                       retour.append("<input type=\"hidden\" id=\"id_"+nomTab+"_"+compteur+"\"  value=\""+object.getIdDailyTimeSheet()+"\"/>");
                       retour.append("<button id=\"del\" name=\"del\"  type=\"button\" onClick=DeleteARow('+id_"+nomTab+"_"+compteur+"')>");
                       retour.append("<img src=icon_delete.gif />");
                       retour.append("</button>");
                       retour.append("</td>");
As you can see each element has a delete button. What i want to know how can i delete one row.
thinks.
© Stack Overflow or respective owner