I would like to know how to show and hide an entire row of a table in PHP using javascript or another function.
I used this function, but when I use it in a onclick
, the line to which it was hidden appears always in the first cell of the previous line.
JavaScript Function
function Mostrar(obj) {
var display = document.getElementById(obj).hidden;
if(display == true)
document.getElementById(obj).style.display = 'none';
else
document.getElementById(obj).style.display = 'block';
}
The table to which I would like to hide the line, is inside a loop for
where I have the sum of several expenses of a certain process, and the line that will be hidden should contain the detailed expenses of this process. >