Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18258 > unrolled thread
| Started by | "FAQ server" <javascript@dotinternet.be> |
|---|---|
| First post | 2013-01-26 00:00 +0000 |
| Last post | 2013-02-06 16:08 +0000 |
| Articles | 20 on this page of 33 — 10 participants |
Back to article view | Back to comp.lang.javascript
FAQ Topic - Why does my code fail to access an element? (2013-01-26) "FAQ server" <javascript@dotinternet.be> - 2013-01-26 00:00 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-27 19:49 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-28 01:32 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Richard Yates <richard@yatesguitar.com> - 2013-01-27 19:16 -0800
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-28 11:58 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-29 23:12 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Gene Wirchenko <genew@telus.net> - 2013-01-29 16:45 -0800
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Andrew Poulos <ap_prog@hotmail.com> - 2013-01-30 14:38 +1100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-30 09:52 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-30 09:31 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Andrew Poulos <ap_prog@hotmail.com> - 2013-01-28 21:55 +1100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-28 16:16 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Andrew Poulos <ap_prog@hotmail.com> - 2013-01-29 08:35 +1100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-28 23:40 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-29 00:21 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-01-29 00:53 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-29 21:24 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.uk.invalid> - 2013-01-30 14:31 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-30 20:22 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.uk.invalid> - 2013-01-31 10:55 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-31 22:42 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.uk.invalid> - 2013-02-01 10:55 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-02-01 16:03 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-30 15:09 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-01-29 00:03 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.invalid> - 2013-01-29 10:10 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-01-30 15:14 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.uk.invalid> - 2013-01-31 10:50 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-02-01 23:29 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) John G Harris <niam@jghnorth.org.uk.invalid> - 2013-02-02 11:10 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-02-03 19:39 +0000
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Christoph Becker <cmbecker69@gmx.de> - 2013-02-04 01:56 +0100
Re: FAQ Topic - Why does my code fail to access an element? (2013-01-26) Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> - 2013-02-06 16:08 +0000
Page 1 of 2 [1] 2 Next page →
| From | "FAQ server" <javascript@dotinternet.be> |
|---|---|
| Date | 2013-01-26 00:00 +0000 |
| Subject | FAQ Topic - Why does my code fail to access an element? (2013-01-26) |
| Message-ID | <51031c8a$0$289$14726298@news.sunsite.dk> |
-----------------------------------------------------------------------
FAQ Topic - Why does my code fail to access an element?
-----------------------------------------------------------------------
An element can only be accessed after it exists in the document.
Either:
A) include your script after the HTML element it refers to, or
B) use the `"load"` event to trigger your script.
Example A:
<div id="snurgle">here</div>
<script type="text/javascript">
// Don't forget var.
var snurgleEl = document.getElementById("snurgle");
window.alert(snurgleEl.parentNode);
</script>
Example B:
// In the HEAD.
<script type="text/javascript">
window.onload = function(){
var snurgleEl = document.getElementById("snurgle");
};
</script>
Other problems can include::
----------------------------
* invalid HTML
* two elements with the same `name` or `id`
* use of an unsafe name: http://jibbering.com/names/
The complete comp.lang.javascript FAQ is at
http://jibbering.com/faq/
--
The sendings of these daily posts are proficiently hosted
by http://www.pair.com.
[toc] | [next] | [standalone]
| From | Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> |
|---|---|
| Date | 2013-01-27 19:49 +0000 |
| Message-ID | <q7VcV3KhTYBRFwQv@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #18258 |
In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >, Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> posted: > >An element can only be accessed after it exists in the document. > False. An element cannot be accessed after it exists; it can only be accessed while it exists. -- (c) John Stockton, nr London, UK. For Mail, see Home Page. Turnpike, WinXP. Web <http://www.merlyn.demon.co.uk/> - FAQ-type topics, acronyms, and links. Command-prompt MiniTrue is useful for viewing/searching/altering files. Free, DOS/Win/UNIX now 2.0.6; see <URL:http://www.merlyn.demon.co.uk/pc-links.htm>.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-28 01:32 +0100 |
| Message-ID | <XnsA156FB85F792eejj99@194.109.133.133> |
| In reply to | #18277 |
Dr J R Stockton wrote on 27 jan 2013 in comp.lang.javascript: > In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >>, Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> > posted: > >> >>An element can only be accessed after it exists in the document. >> > > False. An element cannot be accessed after it exists; it can only be > accessed while it exists. "after it exists" does not necessarily mean it stopped existing. Methinks, if it means anything at all, it just means that at the exact moment it is postulated that it's existence is unknown, so it either still structurally exists or it has cognitively and poststructurally stopped existing. This duality points to the infamous post-existenialism, yet unknown to all javascripters but our undoubtful Thomas and his physical experiences. Better, John, let us keep out of this apparently meaningless and absurt cyberworld and it's microcosmic inflation and keep our mind concentrated on more simple tasks like the theory of regex string manupulation and concatenative amalgamation. Sources: Existentialism [is] a sense of disorientation and confusion in the face of an apparently meaningless or absurd world. http://en.wikipedia.org/wiki/Existentialism. Post-existentialism is [..] an attempt to force existentialism to take on its major critics - namely poststructuralism and cognitive science - through amalgamating them. <http://www.academia.edu/1551987/Post- existentialism_The_Return_of_Existentialism> String theory posits that the elementary particles [..] are not 0- dimensional objects, but rather 1-dimensional oscillating lines. [..] This being a plausible mechanism for cosmic inflation. <http://en.wikipedia.org/wiki/String_theory> Amalgamation is a now largely archaic term. [..] In the United States, it was partly replaced after 1863 by the term miscegenation. <http://en.wikipedia.org/wiki/Amalgamation_(race)> The amalgamation is a single C code file, named "sqlite3.c", that contains all C code for the core SQLite library and the FTS3 and RTREE extensions. <http://www.sqlite.org/amalgamation.html> The incredulity of Thomas has been common since at least the 6th century, when it appears on the Monza ampullae. In those depictions, as later in the Baroque, the image was used to emphasize the importance of physical experiences. <http://en.wikipedia.org/wiki/Doubting_Thomas> -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Richard Yates <richard@yatesguitar.com> |
|---|---|
| Date | 2013-01-27 19:16 -0800 |
| Message-ID | <h1rbg8lmhb4k41ljjraqniupav6jubfeci@4ax.com> |
| In reply to | #18279 |
On Mon, 28 Jan 2013 01:32:43 +0100, "Evertjan."
<exxjxw.hannivoort@inter.nl.net> wrote:
>Dr J R Stockton wrote on 27 jan 2013 in comp.lang.javascript:
>
>> In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk
>>>, Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be>
>> posted:
>>
>>>
>>>An element can only be accessed after it exists in the document.
>>>
>>
>> False. An element cannot be accessed after it exists; it can only be
>> accessed while it exists.
>
>"after it exists" does not necessarily mean it stopped existing.
var $exists = getElementById('SchrodingersCat');
$state = ($exists) ? 'alive' : 'dead';
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-28 11:58 +0100 |
| Message-ID | <XnsA15679D8090CCeejj99@194.109.133.133> |
| In reply to | #18280 |
Richard Yates wrote on 28 jan 2013 in comp.lang.javascript:
> var $exists = getElementById('SchrodingersCat');
> $state = ($exists) ? 'alive' : 'dead';
$state = ($exists) ? 'alive' : 'dead' :: 'both';
This 3-state test needs to be implemented in this 'SchrodingersCat'
example, as existential duality is a RESULT of the test.
Consequently, such testing can kill the cat.
Further I object() to this $existic notation
without any var-iation.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Dr J R Stockton <reply1300@merlyn.demon.co.uk.invalid> |
|---|---|
| Date | 2013-01-29 23:12 +0000 |
| Message-ID | <Ql+yilFBdFCRFwfh@invalid.uk.co.demon.merlyn.invalid> |
| In reply to | #18279 |
In comp.lang.javascript message <XnsA156FB85F792eejj99@194.109.133.133>, Mon, 28 Jan 2013 01:32:43, Evertjan. <exxjxw.hannivoort@inter.nl.net> posted: >Dr J R Stockton wrote on 27 jan 2013 in comp.lang.javascript: > >> In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >>>, Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> >> posted: >> >>> >>>An element can only be accessed after it exists in the document. >>> >> >> False. An element cannot be accessed after it exists; it can only be >> accessed while it exists. > >"after it exists" does not necessarily mean it stopped existing. In English it does. And I am English and you are Dutch. I watched, listened to, and read the Subtitles of the Queen's Speech yesterday. -- (c) John Stockton, Surrey, UK. ¬@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036) Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)
[toc] | [prev] | [next] | [standalone]
| From | Gene Wirchenko <genew@telus.net> |
|---|---|
| Date | 2013-01-29 16:45 -0800 |
| Message-ID | <67rgg895jl8knoupn3dkmga33of55galog@4ax.com> |
| In reply to | #18294 |
On Tue, 29 Jan 2013 23:12:01 +0000, Dr J R Stockton
<reply1300@merlyn.demon.co.uk.invalid> wrote:
>In comp.lang.javascript message <XnsA156FB85F792eejj99@194.109.133.133>,
>Mon, 28 Jan 2013 01:32:43, Evertjan. <exxjxw.hannivoort@inter.nl.net>
>posted:
[snip]
>>"after it exists" does not necessarily mean it stopped existing.
>
>In English it does. And I am English and you are Dutch.
I would call it ambiguous, which is even worse.
[snip]
Sincerely,
Gene Wirchenko
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2013-01-30 14:38 +1100 |
| Message-ID | <VKSdnQ_maJheCJXMnZ2dnUVZ_sidnZ2d@westnet.com.au> |
| In reply to | #18294 |
On 30/01/2013 10:12 AM, Dr J R Stockton wrote: > In comp.lang.javascript message <XnsA156FB85F792eejj99@194.109.133.133>, > Mon, 28 Jan 2013 01:32:43, Evertjan. <exxjxw.hannivoort@inter.nl.net> > posted: > >> Dr J R Stockton wrote on 27 jan 2013 in comp.lang.javascript: >> >>> In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >>>> , Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> >>> posted: >>> >>>> >>>> An element can only be accessed after it exists in the document. >>>> >>> >>> False. An element cannot be accessed after it exists; it can only be >>> accessed while it exists. >> >> "after it exists" does not necessarily mean it stopped existing. > > In English it does. And I am English and you are Dutch. To me "after it exists" can also mean "after it came into existence". > I watched, listened to, and read the Subtitles of the Queen's Speech > yesterday. He watches, listens to, and reads the subtitles of the Queen's speech from yesterday. Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-30 09:52 +0100 |
| Message-ID | <XnsA1586464E824eejj99@194.109.133.133> |
| In reply to | #18297 |
Andrew Poulos wrote on 30 jan 2013 in comp.lang.javascript: > John: >> I watched, listened to, and read the Subtitles of the Queen's Speech >> yesterday. > > He watches, listens to, and reads the subtitles of the Queen's speech > from yesterday. Where even lowercase "subtitles" should not be misunderstood as "subtilities", those often getting lost in compacted subtitle translation. It was an emotional though expected moment for many of us [Dutch], the third abdication in my lifetime, and the fourth ever in the Kingdom of the Netherlands. This abdication is starting to be called "Trixit". I recently watched and listened to "The King's speech" on DVD, where nicely the subtitles were switchoffable. Beatrix has a better grip on her speech. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-30 09:31 +0100 |
| Message-ID | <XnsA15860F268FD5eejj99@194.109.133.133> |
| In reply to | #18294 |
Dr J R Stockton wrote on 30 jan 2013 in comp.lang.javascript: >>"after it exists" does not necessarily mean it stopped existing. > > In English it does. Perhaps: "After it [has] existed". "After it exists" feels to me as rotten language. On the web I found these exampes of "After it exists" including the meaning of "and [perhaps] still existing": "Customers are assigned an account service number only after the building exists." [What should be the use when the building has gone up into thin air?] "the objects are marshaled to help understand what comes after the building exists" ".. such as SetFileAttributes, DeviceIoControl, or DecryptFile after the file already exists." MS even includes a duality here, as they [MS, not IE] usually stop looking after their products when the money stops coming in: "IE will stop looking after the first font that exists" > And I am English and you are Dutch. Which is true but not adding to your argument, as it does not mean that I am not English. [and it does per se not mean that you are not Dutch, or not Malayan] -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2013-01-28 21:55 +1100 |
| Message-ID | <BqidnVGAKqG4xJvMnZ2dnUVZ_vWdnZ2d@westnet.com.au> |
| In reply to | #18277 |
On 28/01/2013 6:49 AM, Dr J R Stockton wrote: > In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >> , Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> > posted: > >> >> An element can only be accessed after it exists in the document. >> > > False. An element cannot be accessed after it exists; it can only be > accessed while it exists. And how have you defined "exists". Surely an element "exists" in the HTML even if the browser has not yet parsed the relevant HTML? Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-28 16:16 +0100 |
| Message-ID | <XnsA156A595A1093eejj99@194.109.133.133> |
| In reply to | #18281 |
Andrew Poulos wrote on 28 jan 2013 in comp.lang.javascript: > On 28/01/2013 6:49 AM, Dr J R Stockton wrote: >> In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >>> , Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> >> posted: >> >>> >>> An element can only be accessed after it exists in the document. >>> >> >> False. An element cannot be accessed after it exists; it can only be >> accessed while it exists. > > And how have you defined "exists". Surely an element "exists" in the > HTML even if the browser has not yet parsed the relevant HTML? HTML is just a string of text, the only elements being character numbers. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Andrew Poulos <ap_prog@hotmail.com> |
|---|---|
| Date | 2013-01-29 08:35 +1100 |
| Message-ID | <Jd2dnRnQztPfcpvMnZ2dnUVZ_sadnZ2d@westnet.com.au> |
| In reply to | #18283 |
On 29/01/2013 2:16 AM, Evertjan. wrote: > Andrew Poulos wrote on 28 jan 2013 in comp.lang.javascript: > >> On 28/01/2013 6:49 AM, Dr J R Stockton wrote: >>> In comp.lang.javascript message <51031c8a$0$289$14726298@news.sunsite.dk >>>> , Sat, 26 Jan 2013 00:00:03, FAQ server <javascript@dotinternet.be> >>> posted: >>> >>>> >>>> An element can only be accessed after it exists in the document. >>>> >>> >>> False. An element cannot be accessed after it exists; it can only be >>> accessed while it exists. >> >> And how have you defined "exists". Surely an element "exists" in the >> HTML even if the browser has not yet parsed the relevant HTML? > > HTML is just a string of text, the only elements being character numbers. Are saying that when some agent parses some HTML then and only then has the document come into existence? Hence an element can't exist until the document does? Andrew Poulos
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2013-01-28 23:40 +0100 |
| Message-ID | <1388733.rf3QE0b1RE@PointedEars.de> |
| In reply to | #18284 |
Andrew Poulos wrote: > On 29/01/2013 2:16 AM, Evertjan. wrote: >> Andrew Poulos wrote on 28 jan 2013 in comp.lang.javascript: >>> On 28/01/2013 6:49 AM, Dr J R Stockton wrote: >>>> FAQ server posted: >>>>> An element can only be accessed after it exists in the document. >>>> False. An element cannot be accessed after it exists; it can only be >>>> accessed while it exists. >>> And how have you defined "exists". Surely an element "exists" in the >>> HTML even if the browser has not yet parsed the relevant HTML? >> HTML is just a string of text, the only elements being character numbers. > > Are saying that when some agent parses some HTML then and only then has > the document come into existence? Hence an element can't exist until the > document does? (For lack of another thread in this newsgroup, I am posting in this one …) This whole “discussion” is ridiculous. First of all, you cannot access an element at all. You can access an element *object* that *represents* an element in the document tree, and reflects the element's content attributes with shorthand properties, using an implementation of a DOM API. There cannot exist such an object in the way that it is accessible by code 1. before the corresponding element has been parsed 2. after the element node has been removed from the document tree, and there are no more references to said object stored in properties accessible by the code. It is not exactly news around here that it is only *safe* to access an element object for an element in the document when that document has been loaded; that is, all its elements have been parsed. This typically is the case when or after the document's “load” event occurs; the former can be handled in a backwards-compatible and – dare I say it? – cross-browser way using the “onload” attribute of the “body” element. Some DOM implementations, particularly those that support the HTML5 API, also support the more specific “DOMContentLoaded” event for which there is no content attribute (yet). <http://www.w3.org/TR/2012/CR-html5-20121217/syntax.html#the-end> -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-29 00:21 +0100 |
| Message-ID | <XnsA1573B751E40eejj99@194.109.133.133> |
| In reply to | #18285 |
Thomas 'PointedEars' Lahn wrote on 28 jan 2013 in comp.lang.javascript: > It is not exactly news around here that it is only *safe* That something is not news is not an argument of fact per se. > to access an > element object for an element in the document when that document has > been loaded; that is, all its elements have been parsed. Element-object van easily be called "elements", when they are part of the document. Otherwise you should not say "document", but "document-object". Elements are not parsed, the source-code is parsed and the used browser-engine then constructs element[-object]s as it seems fit, depending on the engine and on the constraints of the interface (monitor, sound, etc) [size, touchability, colours, smartphone, blind-aid touch display, etc] Also, Thomas, there can also be elements that start existing minutes after the loading has ended, mostly as a result of a user or time-out initiated event. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2013-01-29 00:53 +0100 |
| Message-ID | <10627650.OCROtDH134@PointedEars.de> |
| In reply to | #18287 |
Evertjan. wrote: > Thomas 'PointedEars' Lahn wrote on 28 jan 2013 in comp.lang.javascript: >> It is not exactly news around here that it is only *safe* > > That something is not news is not an argument of fact per se. It was not meant to be. Just a reminder that and why this “dicussion” actually is pointless. >> to access an element object for an element in the document when that >> document has been loaded; that is, all its elements have been parsed. > > Element-object van easily be called "elements", when they are part of the > document. > > Otherwise you should not say "document", but "document-object". > > Elements are not parsed, Utter nonsense, all of the above. One ought to use different terms for things that are different, and the same terms for things that are the same. There is an inherent difference between what constitutes an element and what constitutes an element object, and there is a difference between what constitutes a document and a document object. So those two terms are _not_ interchangeable in any *reasonable* discussion. > the source-code is parsed and the used browser-engine then constructs > element[-object]s as it seems fit, depending on the engine and on the > constraints of the interface (monitor, sound, etc) [size, touchability, > colours, smartphone, blind-aid touch display, etc] “browser-engine” is not an adequate term. And constructed are element objects, not “element[-objects]”. As for the rest, tell me something I do not know yet. > Also, Thomas, there can also be elements that start existing minutes after > the loading has ended, mostly as a result of a user or time-out initiated > event. You have not a shadow of a bit of a clue what you are talking about; you are just parroting what you have heard. Probably someone has told you this before. Unsurprisingly, none of what you said refutes any of my arguments. Either because you have not even read or understood what I said; or you have, but, trolling, you refuse to accept (the truth of) it. There is no advantage in continuing from here, so unless you provide at least *some* substance, it is EOD for me. -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-29 21:24 +0100 |
| Message-ID | <XnsA157D9C879872eejj99@194.109.133.133> |
| In reply to | #18288 |
Thomas 'PointedEars' Lahn wrote on 29 jan 2013 in comp.lang.javascript: >> Element-object van easily be called "elements", when they are part of >> the document. >> >> Otherwise you should not say "document", but "document-object". >> >> Elements are not parsed, > > Utter nonsense, all of the above. So why is it right for you to call the document-object just document, and not for me to call an element-object not an element? repeat>> Elements are not parsed, So you maintain elements are parsed? Please explain where and how with a logical responce, and not with borish exclamations like "utter nonsense". -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2013-01-30 14:31 +0000 |
| Message-ID | <4cwFZ7Ez6SCRFwJX@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| In reply to | #18292 |
In message <XnsA157D9C879872eejj99@194.109.133.133>, Evertjan. wrote: <snip> >repeat>> Elements are not parsed, > >So you maintain elements are parsed? > >Please explain where and how with a logical responce, >and not with borish exclamations like "utter nonsense". They are parsed. Really. If you look at the HTML 4.01 standard you'll see the word 'element' appearing hundreds of times. The meaning comes from the SGML standard. An element is the *text* from the actual or implied start tag to the actual or implied matching end tag, inclusive. The DOM holds information taken from an HTML element. Whether you call it an element or an element object depends on whether the former could cause confusion in a given context. John -- John Harris
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2013-01-30 20:22 +0100 |
| Message-ID | <XnsA158CF4994E69eejj99@194.109.133.133> |
| In reply to | #18300 |
John G Harris wrote on 30 jan 2013 in comp.lang.javascript: > In message <XnsA157D9C879872eejj99@194.109.133.133>, Evertjan. wrote: > > <snip> >>repeat>> Elements are not parsed, >> >>So you maintain elements are parsed? >> >>Please explain where and how with a logical responce, >>and not with borish exclamations like "utter nonsense". > > They are parsed. Really. If you look at the HTML 4.01 standard you'll > see the word 'element' appearing hundreds of times. The meaning comes > from the SGML standard. An element is the *text* from the actual or > implied start tag to the actual or implied matching end tag, > inclusive. The standard you seem to quote is about html definitions of elements of the script, not about the parsing of such script or how it should appear in the dom, I am sure. Anyway those elements have nothing to do with elements or element-objects that exist or do not exist, unless the non-exisisting means that text is just not in the source-code. I trust your standard is not talking about dynamicly altering source-code? > The DOM holds information taken from an HTML element. Only if you define the source-code as a collection of such elements. Even then it is not thos elements that are parsed, as they are only recognized as elements after the parsing of [that part of] the souce script. The dom makes a tree from the information in the source-code. This is a one-way action, as the dom-tree can never reconstruct the original source verbatim. > Whether you call it an element or an element object depends on whether > the former could cause confusion in a given context. That is up to the speaker, but it could be a good advice. >> and not with borish exclamations like "utter nonsense". I didn't have you in mind here. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | John G Harris <niam@jghnorth.org.uk.invalid> |
|---|---|
| Date | 2013-01-31 10:55 +0000 |
| Message-ID | <wrjiQFFS2kCRFwrf@J.A830F0FF37FB96852AD08924D9443D28E23ED5CD> |
| In reply to | #18301 |
In message <XnsA158CF4994E69eejj99@194.109.133.133>, Evertjan. wrote: <snip> >The standard you seem to quote is about html definitions of elements of >the script, not about the parsing of such script or how it should appear >in the dom, I am sure. <snip> "script" ? I'm talking about the HTML text : the .html file. John -- John Harris
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web