Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13032
| Date | 2012-03-23 21:00 -0800 |
|---|---|
| From | Robert Baer <robertbaer@localnet.com> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: IE very slow when showing/hiding table row |
| References | <6fdd22b1-7b67-4dbf-a12b-54450b1c5ec1@pz2g2000pbc.googlegroups.com> |
| Message-ID | <IrqdnRM52fJA2_DSnZ2dnUVZ_gOdnZ2d@posted.localnet> (permalink) |
Lisa Liel wrote:
> I have an app which requires multiple grouping of data. Because
> nested TBODY tags don't work (you can use them in IE, but hiding a
> parent only hides its child rows; it doesn't hide nested TBODYs), I've
> had to use something like this:
>
> <table>
> <tr id=header0 onclick="doShowHide('row0')"><td>Group0</td></tr>
> <tr id=row0 style="display:none"><td>
> <table>
> <tr id=header1 onclick="doShowHide('row1')"><td>Group1</td></tr>
> <tr id=row1 style="display:none"><td>
> <table>
> [data for group0 and group1]
> </table>
> </td></tr>
> </table>
> </td></tr>
> <table>
>
> The script is pretty simple:
>
>
> function doShowHide(rw){
> var o = eval("document.all." + rw);
> if (o.style.display == "none"){
> o.style.display = "";
> } else {
> o.style.display = "none";
> }
> }
>
> Easy peasy, right? But I have a relatively small recordset that ends
> up with header indices from 0 to 559. And when I click a header row,
> it takes countable seconds to either show or hide the child row (in
> IE, at least, but that's what the customer is using). Is there some
> sort of known memory leak in doing this? I mean, it's changing one
> style attribute on one table row, regardless of how much content it
> has (which is never more than maybe 20 rows at the most), and
> shouldn't be so sluggish, should it?
>
> If you need to look at it, I made two static examples:
>
> http://starways.net/temp/temp.html (smallish, only 18 indices)
> http://starways.net/temp/temp2.html (medium, 559 indices)
>
> Thanks for any help you might be able to offer.
> Lisa
I am a JS dummy - but with deleting code that seemed to do nothing, i
wound up with the following that does exactly the same thing (note no JS):
<tr id=header0 ><td>Group0</td></tr>
<tr id=row0 style=""><td>
<table>
<tr id=header1 ><td>Group1</td></tr>
<tr id=row1 style=""><td>
<table>
[data for group0 and group1]
</table>
</td></tr>
</table>
</td></tr>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-23 12:23 -0700
Re: IE very slow when showing/hiding table row Robert Baer <robertbaer@localnet.com> - 2012-03-23 21:00 -0800
Re: IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-26 09:54 -0700
Re: IE very slow when showing/hiding table row Gregor Kofler <usenet@gregorkofler.com> - 2012-03-24 10:16 +0100
Re: IE very slow when showing/hiding table row Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-24 10:58 +0100
Re: IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-26 09:59 -0700
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-24 10:29 +0100
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-24 11:56 +0100
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-24 12:21 +0100
Re: IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-26 10:08 -0700
Re: IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-26 11:30 -0700
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-27 17:23 +0200
Re: IE very slow when showing/hiding table row Gene Wirchenko <genew@ocis.net> - 2012-03-26 13:06 -0700
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-27 15:31 +0200
Re: IE very slow when showing/hiding table row Gene Wirchenko <genew@ocis.net> - 2012-03-27 09:22 -0700
Re: IE very slow when showing/hiding table row Stefan Weiss <krewecherl@gmail.com> - 2012-03-27 18:58 +0200
Re: IE very slow when showing/hiding table row Gene Wirchenko <genew@ocis.net> - 2012-03-27 13:39 -0700
[OT] Octet, byte (was: IE very slow when showing/hiding table row) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-03-28 21:58 +0200
Re: [OT] Octet, byte (was: IE very slow when showing/hiding table row) John G Harris <john@nospam.demon.co.uk> - 2012-03-29 14:40 +0100
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-27 19:25 +0200
Re: IE very slow when showing/hiding table row Lisa Liel <lisa.liel@gmail.com> - 2012-03-26 10:03 -0700
Re: IE very slow when showing/hiding table row SAM <stephanemoriaux.NoAdmin@wanadoo.fr.invalid> - 2012-03-27 15:39 +0200
Re: IE very slow when showing/hiding table row Jeff North <jnorthau@yahoo.com.au> - 2012-03-27 18:47 +1100
csiph-web