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


Groups > comp.lang.javascript > #9200

Re: Wanting to use getElementById()

From Dr J R Stockton <reply1150@merlyn.demon.co.uk>
Newsgroups comp.lang.javascript
Subject Re: Wanting to use getElementById()
Date 2011-12-13 19:52 +0000
Organization Home
Message-ID <1apCv0K6z65OFwMW@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <timstreater-81381E.18065509122011@news.individual.net> <Xns9FB6D66455B83eejj99@194.109.133.133> <timstreater-095030.23590509122011@news.individual.net>

Show all headers | View raw


In comp.lang.javascript message <timstreater-095030.23590509122011@news.
individual.net>, Fri, 9 Dec 2011 23:59:05, Tim Streater
<timstreater@greenbee.net> posted:

>Mmmm, nice idea. I do have a variable number of these tables, but that
>wouldn't create an insurmountable problem. More of a problem is that I
>would then have id conflicts - each table has a similar set of row-
>id's. I expect I could get around this too at the expense of a certain
>amount of recoding.
>
>Is there anything wrong (or dangerous) about what I'm considering, that
>you know of?

My <http://www.merlyn.demon.co.uk/holidays.htm> has a number of tables
constructed by writing their computed HTML.  The tables are all
essentially the same, but constructed in accordance with a data object
which gives the number of rows and their content.  One column can be re-
computed by altering its heading cell.  As I recall, or at least as I
would do it now, all addressing of elements within a table is relative
to that table, not global.

If I were starting again, I'd build the table by DOM methods, as in js-
props.htm or more accurately inc-prop.js.

IMHO, getElementById is something like GO TO (GOTO?) in FORTRAN; one
should use it as little as practical.

-- 
 (c) John Stockton, nr London UK  ?@merlyn.demon.co.uk  IE8 FF8 Op11 Sf5 Cr15
   news:comp.lang.javascript FAQ <http://www.jibbering.com/faq/index.html>.
   <http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
   <http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-09 18:06 +0000
  Re: Wanting to use getElementById() "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-09 20:04 +0000
    Re: Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-09 23:59 +0000
      Re: Wanting to use getElementById() Swifty <steve.j.swift@gmail.com> - 2011-12-10 06:43 +0000
        Re: Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-10 09:55 +0000
        Re: Wanting to use getElementById() "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-10 10:12 +0000
          Re: Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-10 12:16 +0000
            Re: Wanting to use getElementById() "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-10 15:09 +0000
              Re: Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-10 17:10 +0000
                Re: Wanting to use getElementById() "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-10 18:17 +0000
                Re: Wanting to use getElementById() Tim Streater <timstreater@greenbee.net> - 2011-12-10 18:51 +0000
                Re: Wanting to use getElementById() "Evertjan." <exjxw.hannivoort@interxnl.net> - 2011-12-10 19:59 +0000
            Re: Wanting to use getElementById() Denis McMahon <denismfmcmahon@gmail.com> - 2011-12-10 21:22 +0000
              Re: Wanting to use getElementById() Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-12-11 00:52 +0100
      Re: Wanting to use getElementById() Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-13 19:52 +0000
        Re: Wanting to use getElementById() Gene Wirchenko <genew@ocis.net> - 2011-12-13 17:29 -0800
          Re: Wanting to use getElementById() Dr J R Stockton <reply1150@merlyn.demon.co.uk> - 2011-12-15 21:51 +0000
            Re: Wanting to use getElementById() Gene Wirchenko <genew@ocis.net> - 2011-12-15 15:53 -0800

csiph-web