Alert() doesn't. Why?

J

John G Harris

Gregor Kofler wrote:

BTW, you should fix your Message-ID or tell your service provider to do so.

His message IDs conform to the current standard, so nothing needs
"fixing".

John
 
D

Dr J R Stockton

In comp.lang.javascript message <e2f57e5d-99b1-43a1-bc76-2ce6cfa2785c@s1
6g2000prf.googlegroups.com>, Thu, 16 Jun 2011 09:13:53, DrKen
I'm having trouble with Alert() not working.

If an unlabelled statement does not work, precede it with a line
containing just the "word" Zerubabel.

If you do not see an error message for that, then almost certainly the
cause is one of two possibilities :
(1) The flow of execution has not reached that region
(2) You are not seeing an error-reporting dialog - that is a common
fault among inexperienced coders,
 
T

Thomas 'PointedEars' Lahn

Swifty said:
I spent yesterday putting a statement similar to:

alert('Reached line 10')

before every line in one particular routine of mine. I knew it was
being called, and I new that it never returned, but I could not spot
the error.

This at least got me down to the failing line of code. It then took me
another hour to work out why it was failing.

It would have been infinitely better and considerably faster to use a
debugger. It is not that there are not pretty good free ones out there …


PointedEars
 
J

John G Harris

And which standard would that be?

RFC 5536 : Netnews Article Format, which cross references
RFC 5322 : Internet Message Format for message-ID fields, etc.

You'll notice that RFC 5536 is a Proposed Standard, dated 2009-11. This
delay before a Proposed Standard becomes a full Standard is normal for
the IETF. New and updated products are expected to follow a proposed
standard long before its change to full status.

The key requirement for message-IDs is that each news article or mail
message has its own unique ID. Some ways to do this are suggested but
are not compulsory.

John
 
D

Dr J R Stockton

In comp.lang.javascript message <0mkov69nf3me6ee6ka707nbr36r2ideuq2@4ax.
I spent yesterday putting a statement similar to:

alert('Reached line 10')

before every line in one particular routine of mine. I knew it was
being called, and I new that it never returned, but I could not spot
the error.

Copy the code into one textarea, and write the result of something
derived from this in another; copy that back to the script.

X = /* textarea value */ "aaa\nbbb\nccc\nddd"
Z = 3
X.replace(/\n/g, function() { return "\nalert(" + Z++ + ")\n" } )
 
T

Thomas 'PointedEars' Lahn

Swifty said:
Actually, my program wasn't javascript (hence my reference to "a
statement similar to"). There may be debuggers for the language that I
use, but the problem gets more challenging.

You should be more precise. Without saying differently, it is expected that
the program being referred to is written in one of the languages that are
on-topic here (ECMAScript implementations, primarily in browsers; see also
the FAQ). So I understood "a statement similar to" as a reference to a
different "javascript"¹ statement, and I am sure I was not the only one.
The code is a CGI script. When it runs in its natural environment
(under an apache webserver) both STDOUT and STDERR are trapped (STDOUT
is channeled back to the browser, and STDERR is written to the apache
error_log). So, I'm mostly "flying blind" when trying to debug the
code.

CGI is a Web server interface, not a programming language.² So CGI scripts
could also be written in "javascript".

However, if the script is written in Perl or PHP, as it is more common, then
there are debuggers for remote debugging as well. I have not programmed
much server-side Perl, so I do not know whether the EPIC debugger³ can help
you there. Xdebug is a good debugger for both client-side and server-side
PHP and can easily be used with, e.g., Eclipse for remote debugging. Thus I
have debugged PHP Web applications remotely that ran on an Apache Web server
with FastCGI (which is similar to CGI in terms of internal processingâ´) or
mod_php5.


PointedEars
___________
¹ There is no "javascript": <http://PointedEars.de/es-matrix>
² <http://en.wikipedia.org/wiki/Common_Gateway_Interface>
³ <http://www.epic-ide.org/>
â´ <http://en.wikipedia.org/wiki/FastCGI>
 
T

Thomas 'PointedEars' Lahn

John said:
RFC 5536 : Netnews Article Format, which cross references
RFC 5322 : Internet Message Format for message-ID fields, etc.

You'll notice that RFC 5536 is a Proposed Standard, dated 2009-11. This
delay before a Proposed Standard becomes a full Standard is normal for
the IETF. New and updated products are expected to follow a proposed
standard long before its change to full status.

The key requirement for message-IDs is that each news article or mail
message has its own unique ID. Some ways to do this are suggested but
are not compulsory.

No, "some ways" are _not_ "suggested"; it is *strongly* *recommended* in RFC
5536 to use a (fully qualified) domain name (one's own, or that of one's
news provider) for the <id-right> of the Message-ID header field value as
that is a viable means, if not the only one, to keep Message-IDs unique
(over the course of two years):

| 3.1.3. Message-ID
|
| The Message-ID header field contains a unique message identifier.
| Netnews is more dependent on message identifier uniqueness and fast
| comparison than Email is, and some news software and standards
| [RFC3977] might have trouble with the full range of possible
| <msg-id>s permitted by [RFC5322]. This section therefore restricts
| the syntax of <msg-id> as compared to Section 3.6.4 of [RFC5322].
| The global uniqueness requirement for <msg-id> in [RFC5322] is to be
| understood as applying across all protocols using such message
| identifiers, and across both Email and Netnews in particular.
| […]
| When generating a <msg-id>, implementations SHOULD use a domain name
| as the <id-right>.

,-[RFC 2119]
|
| 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
| may exist valid reasons in particular circumstances to ignore a
| particular item, but the full implications must be understood and
| carefully weighed before choosing a different course.

If you think that avoiding spam – which appears to be the intention here,
considering "dont-email.me" – is a "valid reason" to not use a domain name
there, and that "the full implications have been understood and carefully
weighted" by those who do so – which would be required –, think again.

Following that reasoning we could all be using the same <id-right> in our
Message-IDs, thereby increasing the probability of duplicates as the number
of users increases, and subsequently seeing the Network News system breaking
down as e.g. certain articles cannot be submitted or properly distributed
anymore (because they are "already there"; a news server does not consider
the From/Sender header field or other personal markers then).

It would be just another example where users had chosen to give in to
spammers (the first one being address munging, of course), eventually
resulting in the dysfunctionality of the medium (as the increasing number of
flamewars and other off-topic threads suggests already).

(JFTR: My address header fields both refer to mailboxes, the From mailbox is
only more seldom checked than the Reply-To mailbox, since it attracts more
spam.)


F'up2 poster

PointedEars
 
J

John G Harris

John said:
RFC 5536 : Netnews Article Format, which cross references
RFC 5322 : Internet Message Format for message-ID fields, etc.

You'll notice that RFC 5536 is a Proposed Standard, dated 2009-11. This
delay before a Proposed Standard becomes a full Standard is normal for
the IETF. New and updated products are expected to follow a proposed
standard long before its change to full status.

The key requirement for message-IDs is that each news article or mail
message has its own unique ID. Some ways to do this are suggested but
are not compulsory.

No, "some ways" are _not_ "suggested"; it is *strongly* *recommended* in RFC
5536 to use a (fully qualified) domain name (one's own, or that of one's
news provider) for the <id-right> of the Message-ID header field value as
that is a viable means, if not the only one, to keep Message-IDs unique
(over the course of two years):

| 3.1.3. Message-ID
|
| The Message-ID header field contains a unique message identifier.
| Netnews is more dependent on message identifier uniqueness and fast
| comparison than Email is, and some news software and standards
| [RFC3977] might have trouble with the full range of possible
| <msg-id>s permitted by [RFC5322]. This section therefore restricts
| the syntax of <msg-id> as compared to Section 3.6.4 of [RFC5322].
| The global uniqueness requirement for <msg-id> in [RFC5322] is to be
| understood as applying across all protocols using such message
| identifiers, and across both Email and Netnews in particular.
| […]
| When generating a <msg-id>, implementations SHOULD use a domain name
| as the <id-right>.

,-[RFC 2119]
|
| 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
| may exist valid reasons in particular circumstances to ignore a
| particular item, but the full implications must be understood and
| carefully weighed before choosing a different course.

If you think that avoiding spam – which appears to be the intention here,
considering "dont-email.me" – is a "valid reason" to not use a domain name
there, and that "the full implications have been understood and carefully
weighted" by those who do so – which would be required –, think again.
<snip>

You originally said that his message-ID algorithm was wrong. We all note
that you've now changed this to a mere remark, without evidence, that it
is a weaker algorithm than yours.

John
 
R

Ray Banana

Thus spake John G Harris said:
John said:
Thomas 'PointedEars' Lahn wrote:
John G Harris wrote:
Thomas 'PointedEars' Lahn wrote:
Gregor Kofler wrote:
BTW, you should fix your Message-ID or tell your service provider to do
so.
His message IDs conform to the current standard, so nothing needs
"fixing".
[...]
| may exist valid reasons in particular circumstances to ignore a
| particular item, but the full implications must be understood and
| carefully weighed before choosing a different course.
If you think that avoiding spam ¡V which appears to be the intention here,
considering "dont-email.me" ¡V is a "valid reason" to not use a domain name
there, and that "the full implications have been understood and carefully
weighted" by those who do so ¡V which would be required ¡V, think again.

Sorry for jumping into this totally off-topic and preposterous thread (I
know why I've been happily ignoring PE's drivel for more than ten
years).

dont-email.me is, of course, a perfectly legitimate domain name.

hth
 
T

Thomas 'PointedEars' Lahn

John said:
Thomas said:
| 3.1.3. Message-ID
|
| The Message-ID header field contains a unique message identifier.
| Netnews is more dependent on message identifier uniqueness and fast
| comparison than Email is, and some news software and standards
| [RFC3977] might have trouble with the full range of possible
| <msg-id>s permitted by [RFC5322]. This section therefore restricts
| the syntax of <msg-id> as compared to Section 3.6.4 of [RFC5322].
| The global uniqueness requirement for <msg-id> in [RFC5322] is to be
| understood as applying across all protocols using such message
| identifiers, and across both Email and Netnews in particular.
| […]
| When generating a <msg-id>, implementations SHOULD use a domain name
| as the <id-right>.

,-[RFC 2119]
|
| 3. SHOULD This word, or the adjective "RECOMMENDED", mean that there
| may exist valid reasons in particular circumstances to ignore a
| particular item, but the full implications must be understood and
| carefully weighed before choosing a different course.

If you think that avoiding spam – which appears to be the intention here,
considering "dont-email.me" – is a "valid reason" to not use a domain
name there, and that "the full implications have been understood and
carefully weighted" by those who do so – which would be required –, think
again.
<snip>

You originally said that his message-ID algorithm was wrong. We all note
that you've now changed this to a mere remark, without evidence, that it
is a weaker algorithm than yours.

What are you babbling about. It is still wrong, and I have provided
evidence as to why.


PointedEars
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]>,
Wed, 22 Jun 2011 18:38:39, Ray Banana <[email protected]>
posted:

Welcome from a user !
Sorry for jumping into this totally off-topic and preposterous thread (I
know why I've been happily ignoring PE's drivel for more than ten
years).

dont-email.me is, of course, a perfectly legitimate domain name.

Not only is it valid, but it is owned, in Bad Homburg (which makes me
think unknowingly of The Jarabe Tapatío), which may be in the same
country as Gregor. It is not for Thomas to police Gregor's right to use
it, if Thomas's real name is indeed Thomas.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top