Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to replace a class?

48 views
Skip to first unread message

justaguy

unread,
Nov 8, 2016, 9:53:46 PM11/8/16
to

/* create elements of span each with an image and assign them to a same class
*/
var el = document.createElement("span");
el.innerHTML = "<img src='myImg.png'>";
document.body.appendChild(el);
// add some space
var sp = document.createElement("span");
sp.className = "Space";
/*
sp.style.width = "15px";
*/
sp.innerHTML = "<img src='someSpace.png' border=0>";
document.body.appendChild(sp);

var newClass = "anotherObj";

Then, there would variable length of such elements, how do I replace all the elements with class name of "Space" with another class?

Thanks.

Evertjan.

unread,
Nov 9, 2016, 1:56:15 AM11/9/16
to
justaguy <lichun...@gmail.com> wrote on 09 Nov 2016 in
comp.lang.javascript:

>
> /* create elements of span each with an image and assign them to a same
> class */
> var el = document.createElement("span");
> el.innerHTML = "<img src='myImg.png'>";
> document.body.appendChild(el);
> // add some space
> var sp = document.createElement("span");
> sp.className = "Space";
> /*
> sp.style.width = "15px";
> */
> sp.innerHTML = "<img src='someSpace.png' border=0>";
> document.body.appendChild(sp);
>
> var newClass = "anotherObj";
>
> Then, there would variable length of such elements,

Which elements, the spans?

Would there, is this Genesis?

> how do I replace all
> the elements with class name of "Space" with another class?

This Q is independent of the above.

Google "how to replace all elements classname"
and read the many discussions on stackoverflow!

Please first Google!

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

justaguy

unread,
Nov 10, 2016, 10:45:41 AM11/10/16
to
On Wednesday, November 9, 2016 at 1:56:15 AM UTC-5, Evertjan. wrote:
> justaguy <> wrote on 09 Nov 2016 in
> comp.lang.javascript:
>
> >
> > /* create elements of span each with an image and assign them to a same
> > class */
> > var el = document.createElement("span");
> > el.innerHTML = "<img src='myImg.png'>";
> > document.body.appendChild(el);
> > // add some space
> > var sp = document.createElement("span");
> > sp.className = "Space";
> > /*
> > sp.style.width = "15px";
> > */
> > sp.innerHTML = "<img src='someSpace.png' border=0>";
> > document.body.appendChild(sp);
> >
> > var newClass = "anotherObj";
> >
> > Then, there would variable length of such elements,
>
> Which elements, the spans?
>
> Would there, is this Genesis?
>
> > how do I replace all
> > the elements with class name of "Space" with another class?
>
> This Q is independent of the above.
>
> Google "how to replace all elements classname"
> and read the many discussions on stackoverflow!
>
> Please first Google!
>

I did, however, query like ""how to replace all elements classname" did not yield satisfactory returns, thus, asking here.

Ram Tobolski

unread,
Nov 10, 2016, 1:08:07 PM11/10/16
to

>Then, there would variable length of such elements, how do I replace all the elements with class name of "Space" with another class?

Like this?

let elements = document.getElementsByClassName("Space");
elements.forEach(element => element.className = newClass);

Evertjan.

unread,
Nov 10, 2016, 2:37:50 PM11/10/16
to
justaguy <lichun...@gmail.com> wrote on 10 Nov 2016 in
comp.lang.javascript:

>> This Q is independent of the above.
>>
>> Google "how to replace all elements classname"
>> and read the many discussions on stackoverflow!
>>
>> Please first Google!
>>
>
> I did, however, query like ""how to replace all elements classname" did
> not yield satisfactory returns, thus, asking here.

What do you mean by "not satisfactory"?
Usenet is not a restaurant were you order and pay for food.

Methinks the discussions I refer to are very, very satisfactory,
in the sense that you learn the different aspecs and the pit-falls of
the matter at hand.

justaguy

unread,
Nov 10, 2016, 2:58:08 PM11/10/16
to
Promising. dev mode / debugging mode with Chrome seems to indicate correct is correct, however, the replaced element were not rendered with the Chrome browser.

Here's the entire code:

// global var to hold elements for multiple functions
var elS = [];

var addPC = function() {
var el = document.createElement("span");
el.innerHTML = "<img src='pc.png'>";
document.body.appendChild(el);

// add some space
var sp = document.createElement("span");
sp.className = "Space";
/*
sp.style.width = "15px";
*/
sp.innerHTML = "<img src='spacer.png' border=0>";
document.body.appendChild(sp);

// send to global elS as well
elS.push(sp);

}

var connector = function() {

// define line class
let lineC = document.getElementsByClassName('Line');
lineC.innerHTML = "<img src='line.png'>";

// debug
console.log(elS);

// replace class
elS.forEach(el => (el.className = "Line"));
// elS.forEach(el => (el.innerHTML = "<img src='line.png' border=0"));

}

justaguy

unread,
Nov 10, 2016, 2:59:28 PM11/10/16
to
On Thursday, November 10, 2016 at 2:37:50 PM UTC-5, Evertjan. wrote:
> justaguy wrote on 10 Nov 2016 in
> comp.lang.javascript:
>
> >> This Q is independent of the above.
> >>
> >> Google "how to replace all elements classname"
> >> and read the many discussions on stackoverflow!
> >>
> >> Please first Google!
> >>
> >
> > I did, however, query like ""how to replace all elements classname" did
> > not yield satisfactory returns, thus, asking here.
>
> What do you mean by "not satisfactory"?
> Usenet is not a restaurant were you order and pay for food.
>
> Methinks the discussions I refer to are very, very satisfactory,
> in the sense that you learn the different aspecs and the pit-falls of
> the matter at hand.
>

I appreciate your intention and help, however, regarding this particular problem, googling has not helped me to resolve it, hence, here again.


Evertjan.

unread,
Nov 10, 2016, 3:01:42 PM11/10/16
to
justaguy <lichun...@gmail.com> wrote on 10 Nov 2016 in
Did you get a better understanding of the matter?

Remember this is not a paid help-desk.

Evertjan.

unread,
Nov 10, 2016, 3:27:13 PM11/10/16
to
justaguy <lichun...@gmail.com> wrote on 10 Nov 2016 in
comp.lang.javascript:

> On Thursday, November 10, 2016 at 1:08:07 PM UTC-5, Ram Tobolski wrote:
>> >Then, there would variable length of such elements, how do I replace
>> >all the elements with class name of "Space" with another class?
>>
>> Like this?
>>
>> let elements = document.getElementsByClassName("Space");
>> elements.forEach(element => element.className = newClass);
>
> Promising. dev mode / debugging mode with Chrome seems to indicate
> correct is correct,

Correct is always correct, it is a circular argument.

> however, the replaced element were not rendered with
> the Chrome browser.

I doubt that, then it would be INcorrect.

> Here's the entire code:
>
> // global var to hold elements for multiple functions
> var elS = [];

The below function addPC() will not run,
because it is not called anywhere.

> var addPC = function() {
> var el = document.createElement("span");
> el.innerHTML = "<img src='pc.png'>";
> document.body.appendChild(el);
>
> // add some space
> var sp = document.createElement("span");
> sp.className = "Space";
> sp.innerHTML = "<img src='spacer.png' border=0>";
> document.body.appendChild(sp);
>
> // send to global elS as well

why?

> elS.push(sp);
>
>}

The below function connector() will not run,
because it is not called anywhere.

> var connector = function() {
>
> // define line class

That is not defining a class,
that is just making a pointer to a collection of elements.

> let lineC = document.getElementsByClassName('Line');

So this is a collection of elements.

> lineC.innerHTML = "<img src='line.png'>";

A collection of elements cannot have an innerHTML.

You could give the first element of that collection an innerHTML,
like this:

lineC[0].innerHTML = "<img src='line.png'>";

> // debug
> console.log(elS);
>
> // replace class
> elS.forEach(el => (el.className = "Line"));

???

justaguy

unread,
Nov 10, 2016, 4:06:33 PM11/10/16
to
On Thursday, November 10, 2016 at 3:27:13 PM UTC-5, Evertjan. wrote:
> justaguy wrote on 10 Nov 2016 in
Line class definition was totally wrong, I was coping/pasting, not thinking...

Entire code below. Thanks.

<!doctype html>
<html lang="en">
<head>

<script>

// global var: el
// for moving element, later
var elMove = document.createElement("span");

// global var to hold elements for multiple functions
var elS = [];

var addPC = function() {
var el = document.createElement("span");
el.innerHTML = "<img src='pc.png'>";
document.body.appendChild(el);

// add some space
var sp = document.createElement("span");
sp.className = "Space";
/*
sp.style.width = "15px";
*/
sp.innerHTML = "<img src='spacer.png' border=0>";
document.body.appendChild(sp);

// send to global elS as well
elS.push(sp);

}

var connector = function() {

// define line class
let style = document.createElement('style');
style.type = "text/css";
/* FOLLOWING LINE is critical, however, it does not seem to have included such an img element in the span with newly changed Class of "Line"
*/
style.innerHTML = ".Line { img : src='line.png'}";
document.getElementsByTagName('head')[0].appendChild(style);

// debug
console.log(elS);

// replace class
elS.forEach(el => (el.className = "Line"));
// elS.forEach(sp => (sp.innerHTML = "<img src='line.png' border=0"));

}

</script>
</head>

<body>

<form>

<p>Some text here</p>. <input type="button" value="add PC" onclick="addPC();"> &nbsp;&nbsp;
<input type="button" value="connect them" onclick="connector();">
<br/><br/>

</form>

</body>
</html>

Ram Tobolski

unread,
Nov 10, 2016, 4:37:52 PM11/10/16
to
>Entire code below.

Rather than loading a lot of code into a post, it will be better if you upload your code to a "playground" site, like codepen, jsfiddle, jsbin etc, and then put a link to your code in the post.

>style.innerHTML = ".Line { img : src='line.png'}";

There is no such style. This is conflating CSS with HTML.

Evertjan.

unread,
Nov 10, 2016, 4:51:17 PM11/10/16
to
justaguy <lichun...@gmail.com> wrote on 10 Nov 2016 in
comp.lang.javascript:

> I was coping/pasting, not thinking...

Good diagnosis.

That is why I refrain from giving you a working code,
you would just copy and past it, and not understand the code.

However would you debug what you do not understand?

And you would not learn anything.

> Entire code below. Thanks.

No thanks.

justaguy

unread,
Nov 10, 2016, 5:09:09 PM11/10/16
to
On Thursday, November 10, 2016 at 4:51:17 PM UTC-5, Evertjan. wrote:
> justaguy <> wrote on 10 Nov 2016 in
> comp.lang.javascript:
>
> > I was coping/pasting, not thinking...
>
> Good diagnosis.
>
> That is why I refrain from giving you a working code,
> you would just copy and past it, and not understand the code.
>
> However would you debug what you do not understand?
>
> And you would not learn anything.
>
> > Entire code below. Thanks.
>
> No thanks.

The following LINE was the culprit:
style.innerHTML = ".Line { img : src='line.png'}";

however,
style.innerHTML = ".Line { <img src='line.png'> }" does not follow CSS coding convention...


justaguy

unread,
Nov 10, 2016, 5:09:34 PM11/10/16
to
How do we fix this line?
Message has been deleted

Thomas 'PointedEars' Lahn

unread,
Nov 10, 2016, 5:11:55 PM11/10/16
to
This cannot work because d.gEBCN() only returns a reference to an array-
*like* object which does not have a forEach() method by default. You have
to convert that object to an Array instance, or call
Array.prototype.forEach() explicitly:

[].forEach.call(elements, element => element.className = newClass);

Besides, the question was gibberish. Your code does not replace the
elements, it replaces the *class attribute value* of matching elements.

It remains to be seen whether that is really what the OP wants. It is
equally possible that they only want to exchange the class name in the
attribute value:

let oldClassName = "Space";
[].forEach.call(
document.getElementsByClassName(oldClassName),
element => {
element.classList.remove(oldClassName);
element.classList.add(anotherClassName);
});

[We can reasonably assume that HTML user agents that provide an
ECMAScript 2015+ implementation for “let” and the arrow function
syntax also support the DOM4 “classList” property. The vice-versa
assumption is not valid.]

Usually you would just add or remove a class name to/from the attribute
value instead. A stylesheet that requires renaming of a class name in
the attribute value for proper presentation is most certainly ill-designed.

--
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.

Thomas 'PointedEars' Lahn

unread,
Nov 10, 2016, 5:20:26 PM11/10/16
to
Evertjan. wrote:

>> // define line class
>
> That is not defining a class,
> that is just making a pointer to a collection of elements.

There are no pointers in these languages (except in the low-level
implementation). The proper term is _reference_.

>> let lineC = document.getElementsByClassName('Line');
>
> So this is a collection of elements.

It is not a collection, but a node list (an object implementing the NodeList
interface); by contrast, the items of a collection (an object implementing
the HTMLCollection interface, for example) can also be addressed by non-
numeric index, by the name of an item, using the bracket property accessor
or calling the namedItem() method (with a string parameter).

Your From header field still violates network standards and Netiquette. As
to the former, read <https://tools.ietf.org/html/rfc5536#section-3.1.2>.

Evertjan.

unread,
Nov 10, 2016, 6:01:26 PM11/10/16
to
justaguy <lichun...@gmail.com> wrote on 10 Nov 2016 in
comp.lang.javascript:
It is not broken,
it just has no meaning.

justaguy

unread,
Nov 10, 2016, 6:08:12 PM11/10/16
to
The replace image inside each span with another is working now.
See my code below. Probably previously my problem statement were not clear.
Thanks.

var connector = function() {

// get the class
let spaceS = document.getElementsByClassName('Space');

for (s = spaceS.length - 2; s >= 0; s--) {
console.log(s);
try {
spaceS[s].innerHTML = "<img src='line.png' border=0>";
}
catch (err) {
consolo.log(err);
}
}

}

John Harris

unread,
Nov 11, 2016, 5:24:24 AM11/11/16
to
On Thu, 10 Nov 2016 23:20:21 +0100, Thomas 'PointedEars' Lahn
<Point...@web.de> wrote:

<snip>
>There are no pointers in these languages (except in the low-level
>implementation). The proper term is _reference_.
<snip>

Unfortunately, ECMA 262 uses 'reference' with several different
meanings. The only use of the word with Thomas's meaning is in
informal (non-normative) sections and notes. The formal meaning is
defined in Section 6.2.3. It is a rather complicated kind of pointer
to a property; it is NOT the *value* of the property.

Therefore
"The proper term is _reference_."
should be changed to
"The proper term is _reference_ (informal meaning)."

John

John Harris

unread,
Nov 11, 2016, 5:41:28 AM11/11/16
to
On Thu, 10 Nov 2016 23:20:21 +0100, Thomas 'PointedEars' Lahn
<Point...@web.de> wrote:

>Evertjan. wrote:

<snip>
>Your From header field still violates network standards and Netiquette. As
>to the former, read <https://tools.ietf.org/html/rfc5536#section-3.1.2>.

In what way can
'From: "Evertjan." <exxjxw.h...@inter.nl.net>'
possibly disobey the rfc ?

As for Netiquette, the rules obviously depend on his nationality.

John

Thomas 'PointedEars' Lahn

unread,
Nov 11, 2016, 6:22:06 AM11/11/16
to
John Harris wrote:

> […] Thomas 'PointedEars' Lahn […] wrote:
>> Evertjan. wrote:
> <snip>
>> Your From header field still violates network standards and Netiquette.
>> As to the former, read
>> <https://tools.ietf.org/html/rfc5536#section-3.1.2>.
>
> In what way can
> 'From: "Evertjan." <exxjxw.h...@inter.nl.net>'
> possibly disobey the rfc ?

Let me break it down for your one more time:

,-<https://tools.ietf.org/html/rfc5536#section-3.1.2>
|
| 3.1.2. From
|
| The From header field is the same as that specified in Section 3.6.2
| of [RFC5322], with the added restrictions detailed above in
| Section 2.2.
|
| from = "From:" SP mailbox-list CRLF
| […]

,-<https://tools.ietf.org/html/rfc5322#section-3.6.2>
|
| 3.4. Address Specification
|
| Addresses occur in several message header fields to indicate senders
| and recipients of messages. An address may either be an individual
| mailbox, or a group of mailboxes.
|
| address = mailbox / group
|
| mailbox = name-addr / addr-spec
| […]
| A mailbox receives mail. […]
|
| 3.6.2. Originator Fields
|
| The originator fields of a message consist of the from field, the
| sender field (when applicable), and optionally the reply-to field.
| The from field consists of the field name "From" and a comma-
| separated list of one or more mailbox specifications. […]
|
| from = "From:" mailbox-list CRLF
|
| […]
|
| The originator fields indicate the mailbox(es) of the source of the
| message. The "From:" field specifies the author(s) of the message,
| that is, the mailbox(es) of the person(s) or system(s) responsible
| for the writing of the message. […]
|
| In all cases, the "From:" field SHOULD NOT contain any mailbox that
| does not belong to the author(s) of the message. […]

But:

,----
| $ host -t MX inter.nl.net
| inter.nl.net mail is handled by 20 mx20.se.isp-net.nl.
| inter.nl.net mail is handled by 10 mx10.se.isp-net.nl.
|
| $ ssh **** telnet -- mx20.se.isp-net.nl smtp
| Trying 82.215.18.4...
| Connected to mx20.se.isp-net.nl.
| Escape character is '^]'.
| 220 filter02nm.se.isp-net.nl ESMTP Exim 4.86-108158 Fri, 11 Nov 2016
| 12:06:46 +0100
| HELO ****
| 250 filter02nm.se.isp-net.nl Hello **** [****]
| MAIL FROM:<exxjxw.h...@inter.nl.net>
| 250 OK
| RCPT TO:<exxjxw.h...@inter.nl.net>
| 550-5.1.1 <exxjxw.h...@inter.nl.net>: Recipient address rejected:
| 550 User unknown in virtual mailbox table
| QUIT
| 221 filter02nm.se.isp-net.nl closing connection
| Connection closed by foreign host.
`----

(The same is true for mx10.se.isp-net.nl.)

IOW, exxjxw.h...@inter.nl.net is not an e-mail address.

See also: <http://www.interhack.net/pubs/munging-harmful/>

> As for Netiquette, the rules obviously depend on his nationality.

Of course not.

Thomas 'PointedEars' Lahn

unread,
Nov 11, 2016, 6:37:13 AM11/11/16
to
John Harris wrote:

> […] Thomas 'PointedEars' Lahn […] wrote:
>> There are no pointers in these languages (except in the low-level
>> implementation). The proper term is _reference_.
>
> Unfortunately, ECMA 262 uses 'reference' with several different
> meanings.

ECMA-262 is irrelevant in that regard. This is a term borrowed from Java,
which JavaScript was designed to resemble, and therefore applicable to all
ECMAScript implementations; a term that is used in various object-oriented
programming languages (including those that are not implementations of
ECMAScript).

“Reference” is to be understood as “reference to an object”. For in those
languages there can be multiple properties referring to the same object, all
having the same value – a reference to that object –, and that object can be
marked for garbage collection if there are no more references to it.

> The only use of the word with Thomas's meaning is in
> informal (non-normative) sections and notes. The formal meaning is
> defined in Section 6.2.3. It is a rather complicated kind of pointer
> to a property; it is NOT the *value* of the property.

Utter nonsense.

> Therefore
> "The proper term is _reference_."
> should be changed to
> "The proper term is _reference_ (informal meaning)."

No, it should not.

Thomas 'PointedEars' Lahn

unread,
Nov 11, 2016, 6:43:39 AM11/11/16
to
[Supersedes, for correction and completeness]

John Harris wrote:

> […] Thomas 'PointedEars' Lahn […] wrote:
>> Evertjan. wrote:
> <snip>
>> Your From header field still violates network standards and Netiquette.
>> As to the former, read
>> <https://tools.ietf.org/html/rfc5536#section-3.1.2>.
>
> In what way can
> 'From: "Evertjan." <exxjxw.h...@inter.nl.net>'
> possibly disobey the rfc ?

Let me break it down for you one more time:

,-<https://tools.ietf.org/html/rfc5536#section-3.1.2>
|
| 3.1.2. From
|
| The From header field is the same as that specified in Section 3.6.2
| of [RFC5322], with the added restrictions detailed above in
| Section 2.2.
|
| from = "From:" SP mailbox-list CRLF
| […]

,-<https://tools.ietf.org/html/rfc5322#section-3.6.2>
|
| 3.4. Address Specification
|
| Addresses occur in several message header fields to indicate senders
| and recipients of messages. An address may either be an individual
| mailbox, or a group of mailboxes.
|
| address = mailbox / group
|
| mailbox = name-addr / addr-spec
|
| name-addr = [display-name] angle-addr
|
| angle-addr = [CFWS] "<" addr-spec ">" [CFWS] /
| obs-angle-addr
| […]
| display-name = phrase
|
| mailbox-list = (mailbox *("," mailbox)) / obs-mbox-list
> As for Netiquette, the rules obviously depend on his nationality.

Of course not.

Evertjan.

unread,
Nov 11, 2016, 8:47:26 AM11/11/16
to
John Harris <ni...@jghnorth.org.uk.invalid> wrote on 11 Nov 2016 in
comp.lang.javascript:

> As for Netiquette, the rules obviously depend on his nationality.

How would you know my nationality or nationalities?

You would not and do not!

What could one's nationality have to do with Usenet Netiquette?

Nothing!

Evertjan.

unread,
Nov 11, 2016, 8:52:17 AM11/11/16
to
Thomas 'PointedEars' Lahn <Point...@web.de> wrote on 11 Nov 2016 in
comp.lang.javascript:

> IOW, exxjxw.h...@inter.nl.net is not an e-mail address.

It is a form-valid email-address.

What part are you objecting to, Thomas?

> See also: <http://www.interhack.net/pubs/munging-harmful/>

So what, that is just one man's 1998 meaning. I disagree.

>> As for Netiquette, the rules obviously depend on his nationality.
>
> Of course not.

Acc.

Thomas 'PointedEars' Lahn

unread,
Nov 11, 2016, 9:11:39 AM11/11/16
to
Evertjan. wrote:

> Thomas 'PointedEars' Lahn <Point...@web.de> wrote on 11 Nov 2016 in
> comp.lang.javascript:
>
>> IOW, exxjxw.h...@inter.nl.net is not an e-mail address.
>
> It is a form-valid email-address.

No. An e-mail address specifies a mailbox. “A mailbox receives (e-)mail.”
No e-mail can be sent to which you claim would be an e-mail address.

> What part are you objecting to, Thomas?

That which looks like an e-mail address is not one as it does not specify a
mailbox. This is a violation of network standards, and a blatant disregard
of Netiquette, on your part.

>> See also: <http://www.interhack.net/pubs/munging-harmful/>
>
> So what, that is just one man's 1998 meaning. I disagree.

The arguments made there are still valid. In particular, if someone would
register that which you are misusing in your From header field values, they
would be bothered with messages meant for you; so you are spoiling a
namespace that does not belong to you. As it is, the admin(s) of your
server(s) is bothered with error messages caused by messages meant for you,
and people who want to send private messages to you are bothered with
unexpected bounces (you *cannot* expect people to fiddle with their e-mail
clients, let alone to know that they need to fiddle with them; your
signature where you put is a hint as to that is not part of the message and
may not even be displayed).

You are making life harder for everyone else, and you are *helping* spammers
to destroy e-mail as a viable communications medium even though it is very
easy and inexpensive for you to avoid getting spam using proper ways.

You should be ashamed of yourself, especially as this has been explained to
you several times before.

Evertjan.

unread,
Nov 11, 2016, 9:31:00 AM11/11/16
to
Thomas 'PointedEars' Lahn <Point...@web.de> wrote on 11 Nov 2016 in
comp.lang.javascript:

> Evertjan. wrote:
>
>> Thomas 'PointedEars' Lahn <Point...@web.de> wrote on 11 Nov 2016 in
>> comp.lang.javascript:
>>
>>> IOW, exxjxw.h...@inter.nl.net is not an e-mail address.
>>
>> It is a form-valid email-address.
>
> No. An e-mail address specifies a mailbox. “A mailbox receives
> (e-)mail.” No e-mail can be sent to which you claim would be an
> e-mail address.

I do not claim that.
Don't put words into my mouth.
It is a form-valid email-address, I said.

>
>> What part are you objecting to, Thomas?
>
> That which looks

I asked which PART!!!

> like an e-mail address is not one as it does not
> specify a mailbox.

Not at all, it is you that thinks it look like an email-address,
while you profess to know better.

Many email-addresses are not email-boxes.

> This is a violation of network standards,

I don't mind if standards are violated, if that is usefull.

> and a blatant disregard of Netiquette,

Weel, we seem to differ about what is blatant,
and also if that is part of Netiquette.

on your part.

Do you think there would be a cause fot thinking
it was on Hillary's part?


>>> See also: <http://www.interhack.net/pubs/munging-harmful/>
>>
>> So what, that is just one man's 1998 meaning. I disagree.
>
> The arguments made there are still valid.

That is your opinion.

[..]
>
> You are making life harder for everyone else, and you are *helping*
> spammers to destroy e-mail as a viable communications medium even though
> it is very easy and inexpensive for you to avoid getting spam using
> proper ways.

Well, you are sometimes, making life harder, life is hard as it is.

> You should be ashamed of yourself, especially as this has been explained
> to you several times before.

You are a silly little boy,
always thinking that others should behave as you "explain" them to do.

The value of your opinion is not augmented if you state it again and again.

I am not ashamed to sometimes disagree with you, I your arguments stink.

Generally I think it is unusefull to be ashamed at all.

Thomas 'PointedEars' Lahn

unread,
Nov 11, 2016, 10:41:34 AM11/11/16
to
Evertjan. wrote:

> Thomas 'PointedEars' Lahn […] wrote […]:
>> Evertjan. wrote:
>>> Thomas 'PointedEars' Lahn […] wrote […]:
>>>> IOW, exxjxw.h...@inter.nl.net is not an e-mail address.
>>> It is a form-valid email-address.
>> No. An e-mail address specifies a mailbox. “A mailbox receives
>> (e-)mail.” No e-mail can be sent to which you claim would be an
>> e-mail address.
>
> I do not claim that.
> Don't put words into my mouth.
> It is a form-valid email-address, I said.

There is no such thing except in your anti-social address munger’s fantasy
land. A string of characters either specifies a mailbox, that which
receives mail (as described in the RFC); then it is an e-mail address.
Or it does not, then it is not.

>>> What part are you objecting to, Thomas?
>>
>> That which looks
>
> I asked which PART!!!

The address part, of course – as you could have read below.

>> like an e-mail address is not one as it does not
>> specify a mailbox.
>
> Not at all, it is you that thinks it look like an email-address,
> while you profess to know better.
>
> Many email-addresses are not email-boxes.

Utter nonsense.

> [tl;dr]
>
>> You should be ashamed of yourself, especially as this has been explained
>> to you several times before.
>
> You are a silly little boy,
> always thinking that others should behave as you "explain" them to do.
>
> The value of your opinion is not augmented if you state it again and
> again.
>
> I am not ashamed to sometimes disagree with you, I your arguments stink.
>
> Generally I think it is unusefull to be ashamed at all.

Obviously, the same as it is futile to try to convince a troll that they are
trolling and ought to stop, it is futile to convince an anti-social being
such as yourself that their behavior is blatantly anti-social. You should
be disconnected from the network permanently.

<https://www.internl.net/sites/default/files/algemene-voorwaarden-internlnet-oktober-v1-2016.pdf>

.
.
.

Evertjan.

unread,
Nov 11, 2016, 5:54:25 PM11/11/16
to
Thomas 'PointedEars' Lahn <Point...@web.de> wrote on 11 Nov 2016 in
comp.lang.javascript:

>> Many email-addresses are not email-boxes.
>
> Utter nonsense.

I need only one example to contradict you,
that is the joy of logic:

A forwarding email-address is NOT an email-box.

John Harris

unread,
Nov 12, 2016, 9:51:08 AM11/12/16
to
On Fri, 11 Nov 2016 14:46:46 +0100, "Evertjan."
<exxjxw.h...@inter.nl.net> wrote:

>John Harris <ni...@jghnorth.org.uk.invalid> wrote on 11 Nov 2016 in
>comp.lang.javascript:
>
>> As for Netiquette, the rules obviously depend on his nationality.
>
>How would you know my nationality or nationalities?
>
>You would not and do not!
>
>What could one's nationality have to do with Usenet Netiquette?
>
>Nothing!

On the contrary, Evertjan. The guidelines for the German Usenet
hierarchy are different from the guidelines for the UK Usenet
hierarchy. That's why Netiquette depends, to some extent, on the
author's nationality. I don't need to know your nationality to be
absolutely certain that there are other people with a different
nationality. That's all I said, if you read it carefully.

John

John Harris

unread,
Nov 12, 2016, 12:09:32 PM11/12/16
to
On Fri, 11 Nov 2016 12:37:08 +0100, Thomas 'PointedEars' Lahn
<Point...@web.de> wrote:

>John Harris wrote:
>
>> […] Thomas 'PointedEars' Lahn […] wrote:
>>> There are no pointers in these languages (except in the low-level
>>> implementation). The proper term is _reference_.
>>
>> Unfortunately, ECMA 262 uses 'reference' with several different
>> meanings.
>
>ECMA-262 is irrelevant in that regard. This is a term borrowed from Java,
>which JavaScript was designed to resemble, and therefore applicable to all
>ECMAScript implementations;

This is a policy that will lead to considerable confusion.

When you, Thomas, write 'property' must we assume you mean a
Java-style property (which is different from an ECMAScript property)?

When you write that a variable's value is an 'integer' must we assume
you mean a 32 bit Java-style integer (which is not an ECMAScript user
type)?


> a term that is used in various object-oriented
>programming languages (including those that are not implementations of
>ECMAScript).

In C++ a reference variable has a meaning that is different from the
one you are using.


>“Reference” is to be understood as “reference to an object”. For in those
>languages there can be multiple properties referring to the same object, all
>having the same value – a reference to that object –, and that object can be
>marked for garbage collection if there are no more references to it.

a) As primitive strings cannot be altered the compiler is allowed to
use a copy-on-write strategy for them. When it does this, the property
value will be implemented as a Java-style reference. So it's not just
"to an object".

b) ECMA 262 does not require that when a property holds an object it
must be implemented as a Java-style reference or pointer. Equally, it
does not prohibit it. Indeed, if two variables hold the same object
the use of pointers, alias references, is very likely; in which case
it might as well be used when there is only one such variable, but it
is *not* a conformance requirement.

c) ECMA 262 does not require a garbage collector, but, as usual,
allows it.


>> The only use of the word with Thomas's meaning is in
>> informal (non-normative) sections and notes. The formal meaning is
>> defined in Section 6.2.3. It is a rather complicated kind of pointer
>> to a property; it is NOT the *value* of the property.
>
>Utter nonsense.

Are you saying that Section 6.2.3 does not exist? Are you saying that
there is no need for ECMA 262 to define a GetValue specification
function for ECMAScript references?

Yes to either would suggest you've gone doolally.


>> Therefore
>> "The proper term is _reference_."
>> should be changed to
>> "The proper term is _reference_ (informal meaning)."
>
>No, it should not.

Obviously it should.

John

John Harris

unread,
Nov 12, 2016, 1:42:32 PM11/12/16
to
On Fri, 11 Nov 2016 12:43:33 +0100, Thomas 'PointedEars' Lahn
<Point...@web.de> wrote:

<snip>
>IOW, exxjxw.h...@inter.nl.net is not an e-mail address.
<snip>

It is an e-mail address, in the same way that FFFFFFFF FFFFFFFF is a
computer's RAM address, even though it might not have been installed.

Presumably you meant address of a mailbox. You should be more careful
with your terminology.

And, of course, if a mailbox does not exist in this minute that is no
proof at all that it didn't exist when the article was constructed.

John

Evertjan.

unread,
Nov 12, 2016, 2:14:06 PM11/12/16
to
John Harris <ni...@jghnorth.org.uk.invalid> wrote on 12 Nov 2016 in
comp.lang.javascript:

> On Fri, 11 Nov 2016 14:46:46 +0100, "Evertjan."
> <exxjxw.h...@inter.nl.net> wrote:
>
>>John Harris <ni...@jghnorth.org.uk.invalid> wrote on 11 Nov 2016 in
>>comp.lang.javascript:
>>
>>> As for Netiquette, the rules obviously depend on his nationality.
>>
>>How would you know my nationality or nationalities?
>>
>>You would not and do not!
>>
>>What could one's nationality have to do with Usenet Netiquette?
>>
>>Nothing!
>
> On the contrary, Evertjan. The guidelines for the German Usenet
> hierarchy are different from the guidelines for the UK Usenet
> hierarchy. That's why Netiquette depends, to some extent, on the
> author's nationality.

You are totally wrong here.

The different usenet hierarchies have nothing to do
with the nationality or nationalities of a specific user.
And Netiquette addresses the conduct of those.

btw, Usenet does not have authors, only users.
Perhaps that's why it is not called Authornet.

> I don't need to know your nationality to be
> absolutely certain that there are other people with a different
> nationality.

I don't see your point.

> That's all I said, if you read it carefully.

Read exactly what carefully?
On Usenet referring to earlier postings should be quoted.

justaguy

unread,
Nov 12, 2016, 2:35:37 PM11/12/16
to
On Saturday, November 12, 2016 at 2:14:06 PM UTC-5, Evertjan. wrote:
> John Harris .... wrote on 12 Nov 2016 in
> comp.lang.javascript:
>
> > On Fri, 11 Nov 2016 14:46:46 +0100, "Evertjan."
> > <exxjxw.h...@inter.nl.net> wrote:
> >
> >>John Harris <...> wrote on 11 Nov 2016 in
> >>comp.lang.javascript:
> >>
> >>> As for Netiquette, the rules obviously depend on his nationality.
> >>
> >>How would you know my nationality or nationalities?
> >>
> >>You would not and do not!
> >>
> >>What could one's nationality have to do with Usenet Netiquette?
> >>
> >>Nothing!
> >
> > On the contrary, Evertjan. The guidelines for the German Usenet
> > hierarchy are different from the guidelines for the UK Usenet
> > hierarchy. That's why Netiquette depends, to some extent, on the
> > author's nationality.
>
> You are totally wrong here.
>
> The different usenet hierarchies have nothing to do
> with the nationality or nationalities of a specific user.
> And Netiquette addresses the conduct of those.
>
> btw, Usenet does not have authors, only users.
> Perhaps that's why it is not called Authornet.
>
> > I don't need to know your nationality to be
> > absolutely certain that there are other people with a different
> > nationality.
>
> I don't see your point.
>
> > That's all I said, if you read it carefully.
>
> Read exactly what carefully?
> On Usenet referring to earlier postings should be quoted.
>

Hi, all three of you probably belong to the top 5% of programmers. I greatly appreciate your expertise and advice and let me assume the fault of the recent arguments for the simple fact it stems from this thread which I started. Could you guys look at the updates of the other thread about how to save an HTML page that has many dynamically generated elements via DOM?
Thanks.

John Harris

unread,
Nov 13, 2016, 6:14:02 AM11/13/16
to
On Sat, 12 Nov 2016 20:13:22 +0100, "Evertjan."
<exxjxw.h...@inter.nl.net> wrote:

>John Harris <ni...@jghnorth.org.uk.invalid> wrote on 12 Nov 2016 in
>comp.lang.javascript:
>
>> On Fri, 11 Nov 2016 14:46:46 +0100, "Evertjan."
>> <exxjxw.h...@inter.nl.net> wrote:
>>
>>>John Harris <ni...@jghnorth.org.uk.invalid> wrote on 11 Nov 2016 in
>>>comp.lang.javascript:
>>>
>>>> As for Netiquette, the rules obviously depend on his nationality.
>>>
>>>How would you know my nationality or nationalities?
>>>
>>>You would not and do not!
>>>
>>>What could one's nationality have to do with Usenet Netiquette?
>>>
>>>Nothing!
>>
>> On the contrary, Evertjan. The guidelines for the German Usenet
>> hierarchy are different from the guidelines for the UK Usenet
>> hierarchy. That's why Netiquette depends, to some extent, on the
>> author's nationality.
>
>You are totally wrong here.
>
>The different usenet hierarchies have nothing to do
>with the nationality or nationalities of a specific user.
>And Netiquette addresses the conduct of those.

But the guidelines talk of Netiquette items - attributions for
instance. Germans don't have to take any notice of the German
guidelines, but some do. Britons don't have to take any notice of the
UK guidelines, but some do. Nationality can make a difference.


>btw, Usenet does not have authors, only users.
>Perhaps that's why it is not called Authornet.

Each Usenet article does have an author, or are you claiming to be an
AI entity?


>> I don't need to know your nationality to be
>> absolutely certain that there are other people with a different
>> nationality.
>
>I don't see your point.

See above : your nationality can make a difference, and that is so
regardless of your actual nationality. Remark : you claimed that I
didn't know your nationality; I'm pointing out that it's irrelevant.


>> That's all I said, if you read it carefully.
>
>Read exactly what carefully?
>On Usenet referring to earlier postings should be quoted.

It's already quoted at the beginning of the article. I'm not going to
quote it twice.

John
0 new messages