Ask Your Question
1

How can the current table row be hidden inline through the use of Javascript?

asked 2022-05-05 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-06-17 13:00:00 +0000

lalupa gravatar image

You can hide the current table row inline using the following code:

var currentRow = document.currentScript.parentNode.parentNode; //get the current table row
currentRow.style.display = "none"; //set the "display" CSS property to "none" to hide the row

Note that this code assumes that the JavaScript is being executed from within an event handler that is attached to a DOM element inside the table row. If this is not the case, you will need to modify the code to obtain a reference to the current table row.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-05-05 11:00:00 +0000

Seen: 8 times

Last updated: Jun 17 '22