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


Groups > comp.lang.javascript > #28467

Re: Recursive function to find a node in the DOM

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Recursive function to find a node in the DOM
Date Sat, 25 Jul 2015 14:11:57 +0200
Organization PointedEars Software (PES)
Lines 82
Message-ID <1458271.t0pGGtDH7K@PointedEars.de> (permalink)
References <mo53os$am9$1@dont-email.me> <5530725.v0RXNFEj4j@PointedEars.de> <mo5gf4$l2m$1@dont-email.me> <4029225.tIX9iqhVEp@PointedEars.de> <mol5k8$v99$1@dont-email.me>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1437826521 1452 eJwFwYEBwCAIA7CXZNAWz0GU/09YAqexFQQDg7GO3Pe0ylx5W7dnGQ07sCog+BtSOXW+5/UDGjYRCQ== (25 Jul 2015 12:15:21 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Sat, 25 Jul 2015 12:15:21 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwYkBwDAIAsCV8glknCh1/xF6FxsTxYPAiY5mLgtYGPoWl1+yiu3STQ5cb7KVTDggfTdLL8Jvq+DpH1ZwFe4=
Cancel-Lock sha1:kS47NyC3Tm3qnU7LpHiQGqXAGJ4=
X-NNTP-Posting-Host eJwFwYEBwCAIA7CXrNAi56CD/09YQhP0wkU5hxPnWH+i+cwtrLwNC4teA7zMrUJP3rcJkfUDFwUQ1w==
Mail-Copies-To usenet@PointedEars.de
Xref csiph.com comp.lang.javascript:28467

Show key headers only | View raw


danca (Daniele Campagna) wrote:

[Fixed quotation]

> […] But IIUC, I would need different functions for different elements,

Not necessarily.

> and maybe feature testing for getElementsByName...

Definitely.

> As I said previously, if you have:
> 
> […]
> 
> IE 7 (and IE 8 in compatibility mode) both show a gracious bug.

Which would be?  I must have missed that.

> At the time I made the test I wrote nodeFind(), that does not fail with 
> any known [by me] browser.

With *your* documents, in *your* environments.

> IIRC there were cross-browsers problems with
> getElementsByTagName at the time - not sure of that, anyway.

AISB, there could only be cross-browser problems with IE < 5.5.  Problems 
that are solvable with code.
 
> JFC, here are some issues I remember I had to face in last years, apart
> the previously described one:
> - getElementsByName/getElementsByTagName not implemented

Name one.

> - mysterios bug in Opera in printing a frame
> - bug in Opera in iframes readystate
> - bug in IE about the test for the existence of a method in designmode
> - bug in Firefox if trying to get a specific property of a window

Specify.

> - try... catch not implemented

Not since IE/MSHTML/JScript 5.5 and Mozilla 1.0.  See the ES Matrix.

> - the old problem of knowing if a page is completely loaded and rendered

Yes, but in most cases the problem with that was a wrong approach.
 
> ? Not sure to understand. If the user only wants to change a description
             ^^
_I_

> in the form (that reflects the content of a record in a database), the
> <submit> sends the form with no <file> control, so the CGI server side
> only updates the record. If a <file> control is present the CGI takes a
> different route, uploads the file, stores the file somewhere and writes
> the address to the database etc.

You cannot set the “type” property of “input” elements that are in the 
document, everywhere, so you need to replace the input[type="text"] with an 
input[type="file"] in any case.  So what do you need the (supposedly) *read-
only* input[type="text"] for in the first place?  Go with a div, or 
something like that, instead.

>>>> There is no “javascript”.
>>> ECMA, ok, ECMA.
>> […]
> 
> I meant "ECMA" as string substitution of "java". I sould have written:
> s/Java/ECMA/

That would not make a considerable change.

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

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


Thread

Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 09:59 +0200
  Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-15 11:59 +0200
    Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-15 12:03 +0200
    Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-15 13:36 +0200
      Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-19 12:27 +0200
        Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-19 12:34 +0200
        Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-21 12:08 +0200
          Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-25 14:11 +0200
            Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-25 21:22 +0200
              Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-27 16:12 +0200
    Re: Recursive function to find a node in the DOM "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-08-08 04:50 +0200
      Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-08 09:33 +0200
        Re: Recursive function to find a node in the DOM "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-08-12 00:48 +0200
          Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-12 01:18 +0200
            Re: Recursive function to find a node in the DOM "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-08-13 23:26 +0200
              Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-16 08:48 +0200
                Re: Recursive function to find a node in the DOM "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-08-20 02:11 +0200
  Re: Recursive function to find a node in the DOM Scott Sauyet <scott.sauyet@gmail.com> - 2015-07-18 15:59 -0700
    Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-21 12:30 +0200
      Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-21 13:53 +0200
        Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-21 14:51 +0200
          Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-07-21 16:05 +0200
            Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-07-21 20:35 +0200
            Re: Recursive function to find a node in the DOM Scott Sauyet <scott.sauyet@gmail.com> - 2015-07-30 22:10 -0700
              Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-08-06 10:07 +0200
                Re: Recursive function to find a node in the DOM Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-08-06 20:15 +0200
                Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-08-08 01:21 +0200
        Re: Recursive function to find a node in the DOM Scott Sauyet <scott.sauyet@gmail.com> - 2015-07-30 22:09 -0700
  Re: Recursive function to find a node in the DOM Denis McMahon <denismfmcmahon@gmail.com> - 2015-07-29 03:04 +0000
    Re: Recursive function to find a node in the DOM "danca (Daniele Campagna)" <cyberdanny@tiscalinet.it> - 2015-08-06 10:20 +0200

csiph-web