dynamically deleting row in struts

Hi All,

Can any one suggest me how to delete a row by highlighting it. I am using struts frame work and my home page consists of a table with the data populated from the database, my requirement here is to give an option to the user to delete a row by highlight it. I do not have any idea of doing this. Do we have any specific functionality in struts to do this?

Please help me out.

Thanks.

[416 byte] By [Sowja] at [2007-11-27 7:05:01]
# 1
Hi Sowj,I am not aware of any struts functionality to do this. If can add/remove table rows dynamically using javascript. Check out this link , which is the first result when i googled. http://www.codeproject.com/jscript/Add_and_Delete_Table_rows.asp
R@njita at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Hi Sowj,I am not aware of any struts functionality to do this. You can add/remove table rows dynamically using javascript. Check out this link , which is the first result when i googled. http://www.codeproject.com/jscript/Add_and_Delete_Table_rows.asp
R@njita at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thank you for your solution, but I need to know if there is any thing in Struts to deal with this.
Sowja at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Here I do not have a check box, I have to highlight the row and delete, the one you have given is in .net, I do not even have a basic knowledge in it. If any one know other solution please help me out..
Sowja at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5

Hi ,

Sorry if the previous link was of no use to you. May be this will help you to add/ remove table rows from html using js.

http://www.mredkj.com/tutorials/tableaddrow.html

and add/remove html elements using js

http://www.dustindiaz.com/add-and-remove-html-elements-dynamically-with-javascript/

Not sure , how to highlight a row and delete it , but you can have onClick,onKeyDown,ondblclick ..... events on TR which may be used to trigger the deletion.

R@njita at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
Thank you for your response, but I only need to highlight and delete the row in table. None of the links given by you does this functionality. Any way thanks a lot!!
Sowja at 2007-7-12 18:56:19 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...