Dronealone
IS-IT--Management
Hi,
I am using the following function working with the id's of <tbody> tags to expand and contract table rows:
function toggle_element(id) {
the_element = document.getElementById(id);
image_name = 'toggle_' + id;
the_image = document.getElementById(image_name);
if (the_element.style.display == 'none' || the_element.style.display == '')
{
the_element.style.display = 'block';
the_image.src='/images/minus.gif';
}
else
{
the_element.style.display = 'none';
the_image.src='/images/plus.gif';
}
}
The rows are a form which when posted loses the current expanded / contracted state of the table.
Does anybody know a good way of keeping the 'viewstate' of the table?
Many thanks.
I am using the following function working with the id's of <tbody> tags to expand and contract table rows:
function toggle_element(id) {
the_element = document.getElementById(id);
image_name = 'toggle_' + id;
the_image = document.getElementById(image_name);
if (the_element.style.display == 'none' || the_element.style.display == '')
{
the_element.style.display = 'block';
the_image.src='/images/minus.gif';
}
else
{
the_element.style.display = 'none';
the_image.src='/images/plus.gif';
}
}
The rows are a form which when posted loses the current expanded / contracted state of the table.
Does anybody know a good way of keeping the 'viewstate' of the table?
Many thanks.