J
John Dalberg
What's the best way to hide a bunch of rows in sequence of a table that
works properly across different browsers?
John Dalberg
works properly across different browsers?
John Dalberg
What's the best way to hide a bunch of rows in sequence of a table that
works properly across different browsers?
What's the best way to hide a bunch of rows in sequence of a [table that
works properly across different browsers]?
John Dalberg
What's the best way to hide a bunch of rows in sequence of a [table that
works properly across different browsers]?
Most tables already work proberly across different browsers.
<td style="display: none;">...
<td style="display: none;">...
In alt.html John Dalberg said:
don't put them in the table until needed using a server side process or
as second best tr{display:none;} but browser support varies.
I need to hide a set of of rows in one Javascript statementdepending on a
criteria being selected in a form.
Something like below doesn't work.
John said:John Dalberg
What's the best way to hide a bunch of rows in sequence of a [table that
works properly across different browsers]?
Most tables already work proberly across different browsers.
<td style="display: none;">...
<td style="display: none;">...
I need to hide a set of of rows in one Javascript statementdepending on a
criteria being selected in a form.
Something like below doesn't work. Changing the display style for MyRows to
none has no effect.
....
<div id="MyRows">
<tr>... </tr>
<tr>....</tr>
<tr>....</tr>
</div>
Well if you *need* it, then Javascript isn't the answer. Client side
script cannot be relied on.
Plus you should have mentioned this in your OP, so the answers might
have been a bit more relevant.
Of course not. You can't put <tr>s in a <div>. Didn't the validator tell
you that?
You would have to assign each <tr> an id, and apply the style to each.
But as brucie said, browser support will vary - probably even more so
when attempting to do it dynamically. Even if the browser does allow it
the whole page is going to jump around.
You would be better off describing the actual problem, rather than the
perceived solution. Then maybe we can suggest a better way to achieve
what it is you are trying to do.
<style type="text/css">
/*
IE 5.5 does not actually support "table-row-group"
only "table-header-group" and "table-footer-group"
but I've found the following CSS renders correctly
*/
tbody.on { display:table-row-group; }
tbody.off { display:none; }
[snip]
function toggleTbody(id) {
if (document.getElementById) {
var tbod = document.getElementById(id);
if (tbod && typeof tbod.className == 'string') {
if (tbod.className == 'off') {
tbod.className = 'on';
} else { tbod.className = 'off';
}
}
} return false;
}
The rows are part of a form and I want to hide/unhide a section using
client side script depending on criteria selected.
John Dalberg
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.