Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #33883
| From | Peter Flynn <peter@silmaril.ie> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Inserting a DIV inside another DIV |
| Date | 2017-08-26 21:21 +0100 |
| Organization | Usenet Labs Bozon Detector Facility |
| Message-ID | <f0e3hoFs79eU1@mid.individual.net> (permalink) |
| References | <f8562d64-82c7-4f5b-832f-4a8e4e7e7f00@googlegroups.com> <XnsA7DA7B81F3EA5eejj99@194.109.6.166> <e8340f56-ccf7-48ef-9662-e5ab7a498476@googlegroups.com> <XnsA7DB5B3E25BD7eejj99@194.109.6.166> <6711ac96-c627-4e0c-b267-6a7602e0cdc5@googlegroups.com> |
On 25/08/17 07:16, bit-naughty@hotmail.com wrote: [snip] > Umm *bro*, if one should call you that, it's the "appending it INSIDE" part that confuzzles me: Yes, it's confusing if you don't understand this kind of markup. Doubly confusing because the designer who chose that phrase also didn't understand this kind of markup — you are correct, one does not "append" inside an element, one "inserts". One "appends" to a list; if there is nothing to append to, it makes no sense touse the word "append". But we're stuck with it, I'm afraid. Moral of the story if that designers of languages need to read the spec and understand the structure and syntax of the data they are planning to deal with. [snip] > I find that very confusing - you're calling something INSIDE div2 , > instead of div2 being an *argument*!! I would have thought that if > you want something inside "div", you tell it 1) what you want, and 2) > inside what, i.e. BOTH of them would be arguments. ...Me not the OOP > fanatic, remember....? THAT's the main reason for all the > questions..... That's part of the flawed syntax of Javascript, unfortunately. Essentially, you are right: 1. position yourself (your memory pointer, location, whatever you call it) INSIDE the element you want to insert into, in the desired location with respect to any existing subelements that may exist; 2. perform an INSERT instruction > Why did they do it this way (if, indeed, they have), out of > curiosity? You can see why the designer believed that this should be called "append", because s/he never considered the case[s] where you might want to insert an element inside another, at a location BEFORE any existing subelements; or BETWEEN two existing subelements. S/he only considered the case of adding to the end of the existing subelements, and ignored the case where the containing element was actually empty. Basically, if you don't understand this kind of nested markup, you shouldn't be designing a language that deals with it. In dealing with SGML/HTML/XML you need to think like a tree, not like a chainsaw. ///Peter -- XML FAQ: http://xml.silmaril.ie/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Inserting a DIV inside another DIV bit-naughty@hotmail.com - 2017-08-22 21:47 -0700
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-23 12:08 +0200
Re: Inserting a DIV inside another DIV bit-naughty@hotmail.com - 2017-08-23 23:19 -0700
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-24 08:58 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-08-24 08:55 +0100
Re: Inserting a DIV inside another DIV bit-naughty@hotmail.com - 2017-08-24 23:16 -0700
Re: Inserting a DIV inside another DIV tony@mountifield.org (Tony Mountifield) - 2017-08-25 09:04 +0000
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-25 15:54 +0100
Re: Inserting a DIV inside another DIV bit-naughty@hotmail.com - 2017-08-27 23:43 -0700
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-28 11:04 +0100
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-08-28 04:02 -0700
Re: Inserting a DIV inside another DIV "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-08-28 06:24 -0700
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-08-28 07:42 -0700
Re: Inserting a DIV inside another DIV "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-08-29 06:45 -0700
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-28 15:13 +0100
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-08-28 07:30 -0700
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-29 10:11 +0100
Re: Inserting a DIV inside another DIV "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-08-29 07:00 -0700
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-30 18:24 +0100
Re: Inserting a DIV inside another DIV "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-08-29 06:57 -0700
Re: Inserting a DIV inside another DIV "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-08-29 06:51 -0700
Re: Inserting a DIV inside another DIV bit-naughty@hotmail.com - 2017-09-02 11:18 -0700
Re: Inserting a DIV inside another DIV Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2017-09-11 19:57 -0300
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-09-12 05:30 -0700
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-09-12 14:37 +0200
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-09-12 06:15 -0700
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-09-12 15:44 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-09-12 14:51 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-09-12 16:38 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-09-12 20:20 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-09-13 18:47 +0200
Re: Inserting a DIV inside another DIV Joao Rodrigues <groups_jr-1@yahoo.com> - 2017-09-13 01:20 -0300
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-25 14:33 +0200
Re: Inserting a DIV inside another DIV Peter Flynn <peter@silmaril.ie> - 2017-08-26 21:21 +0100
Re: Inserting a DIV inside another DIV Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-27 03:16 +0200
Re: Inserting a DIV inside another DIV Peter Flynn <peter@silmaril.ie> - 2017-08-27 11:40 +0100
Re: Inserting a DIV inside another DIV Julio Di Egidio <julio@diegidio.name> - 2017-08-27 04:05 -0700
Re: Inserting a DIV inside another DIV Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-27 16:15 +0200
Re: Inserting a DIV inside another DIV Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-08-27 16:27 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-08-27 15:42 +0100
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-27 14:10 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-27 15:40 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-28 10:50 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-28 22:35 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-08-28 22:53 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-29 00:27 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-29 10:16 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-29 23:05 +0200
Re: Inserting a DIV inside another DIV Tim Streater <timstreater@greenbee.net> - 2017-08-29 22:51 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-30 00:29 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-30 16:33 +0100
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-29 09:57 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-29 18:05 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-30 16:33 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-30 21:43 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-31 10:08 +0100
Re: Inserting a DIV inside another DIV "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-08-31 16:40 +0200
Re: Inserting a DIV inside another DIV John G Harris <niam@jghnorth.org.uk.invalid> - 2017-08-31 18:37 +0100
csiph-web