By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,985 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,985 IT Pros & Developers. It's quick & easy.

deleting a row of table that cursor pointing to it

P: 2
deleting a row of table that cursor pointing to it.so can any one help me how to do this..?
Apr 29 '16 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you are aware that by merely pointing the cursor at a row it may delete more rows than you intend to delete (since when one row is deleted, the next row is placed under the cursor).

anyways, the core principle for deleting a row is quite simple.

Expand|Select|Wrap|Line Numbers
  1. // evt - the event object received when the desired event is triggered
  2. var row = evt.target.closest('tr');
  3. row.parentNode.removeChild(row);
Apr 29 '16 #2

P: 2
Thanks for your response.but i did tried it before its not working
Apr 29 '16 #3

Dormilich
Expert Mod 5K+
P: 8,639
"not working" is not a useful error description. what is happening that shouldn’t (and vice versa)? what about the error console? have you checked using break points?

and as far as the example code is concerned, it does work (albeit not in IE).
Apr 29 '16 #4

Post your reply

Sign in to post your reply or Sign up for a free account.