Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13035
| Message-ID | <3200796.aU67uLZWGn@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2012-03-24 10:58 +0100 |
| Subject | Re: IE very slow when showing/hiding table row |
| Newsgroups | comp.lang.javascript |
| References | <6fdd22b1-7b67-4dbf-a12b-54450b1c5ec1@pz2g2000pbc.googlegroups.com> <jkk3do$i45$1@dont-email.me> |
| Followup-To | comp.lang.javascript |
Followups directed to: comp.lang.javascript
Gregor Kofler wrote:
> Am 2012-03-23 20:23, Lisa Liel meinte:
>> function doShowHide(rw){
>> var o = eval("document.all." + rw);
>> if (o.style.display == "none"){
>> o.style.display = "";
>> } else {
>> o.style.display = "none";
>> }
>> }
>
> Ugh! You know what is said about eval()?
>
> var o = document.getElementById(rw);
>
> will do the same in a safer and compatible way.
ACK for "safer", but I am not so sure about "compatible". When in doubt,
use both (with the bracket property accessor instead of eval(), of course),
falling back to the former (falling back to document.layers, if need be).
PointedEars
--
realism: HTML 4.01 Strict
evangelism: XHTML 1.0 Strict
madness: XHTML 1.1 as application/xhtml+xml
-- Bjoern Hoehrmann
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