Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #13035

Re: IE very slow when showing/hiding table row

Path csiph.com!usenet.pasdenom.info!news.chainon-marquant.org!nntpfeed.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="ISO-8859-1"
Message-ID <3200796.aU67uLZWGn@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Organization PointedEars Software (PES)
Date Sat, 24 Mar 2012 10:58:30 +0100
User-Agent KNode/4.4.11
Content-Transfer-Encoding 7Bit
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
MIME-Version 1.0
Lines 29
NNTP-Posting-Date 24 Mar 2012 10:58:30 CET
NNTP-Posting-Host 182a5bc0.newsspool1.arcor-online.net
X-Trace DXC=fNAS861bF3PHigV@eW57PQic==]BZ:af^4Fo<]lROoRQ<`=YMgDjhgRn:oU1L8[`\^DZm8W4\YJN\J`:FmdeL>KP6JDa4d]ka`Uf7dSGNdYM1W
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:13035

Followups directed to: comp.lang.javascript

Show key headers only | View raw


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


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