File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Deleting a row dynamically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Deleting a row dynamically" Watch "Deleting a row dynamically" New topic
Author

Deleting a row dynamically

Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi,

I have table wihich is created dynamically. It has check box has one column and Some Name field has another column. It value of the checkbox is the id of the Name column. I need to delete certain rows which matches a criteria. I can iterate througn the checkboxes array and find out which needs to be deleted. But i dont knw how to delete that row, that is i dont know how to get the row now of the particular row.

Can anyone help me in solving this.
Thanks in advance.

Regards,
Arul.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Is this a delete as in remove from the users view or as in delete permanently from the Database?

Eric
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Thanks Eric. Its jst enough for me to remove from the screen.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Well we can just change the display of the row to none which will hide it.

document.getElementById("theRowId").style.display = "none";

That will hide it from the user's view. Now if you want to totally get rid of it. You can try:

var row = document.getElementById("theRowId");
var table = document.getElementById("theTableId").
table.deleteRow(row);

That should get you started.

Eric
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Thanks a lot Eric that worked out.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deleting a row dynamically