FAQEditor wrote at 2007-09-04 08:43 GMT-0500:
Thomas 'PointedEars' Lahn said the following on 9/3/2007 8:14 PM:
20 days ago was about the time I changed the email address in the FAQ to
the current one. If you sent an email to the old address then it would
explain why I haven't received it. If you sent it to (e-mail address removed)
then I honestly do not know why I have not received it unless it didn't
have FAQ in the Subject line of the email. If you would, please forward
it or re-send it to (e-mail address removed) and make sure the Subject Line
has FAQ in it so that the spam filter doesn't catch it by mistake.
Although personally, I would prefer that comments regarding the FAQ -
and its contents - be posted to the group so that it can be reviewed and
commented on by the group.
Here you are:
---------------------------------------------------------------------------
Message-ID: <
[email protected]>
Date: Wed, 15 Aug 2007 17:32:12 +0200
From: Thomas 'PointedEars' Lahn <******************>
Reply-To: Thomas 'PointedEars' Lahn <*******************>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6)
Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: (e-mail address removed)
CC: (e-mail address removed)
Subject: Suggestions for the comp.lang.javascript FAQ
Content-Type: multipart/signed; protocol="application/x-pkcs7-signature";
micalg=sha1; boundary="------------ms000907080800040308070406"
This is a cryptographically signed message in MIME format.
--------------ms000907080800040308070406
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hello Randy,
Hello Jim,
here are some of my comments to and suggestions for the cljs FAQ and the
FAQ Notes.
Regarding the FAQ:
| 4.24 I have <a href="javascript:somefunction()"> what ... ?
|
| Whatever the rest of your question, this is generally a very bad use of
| the javascript pseudo protocol. It was designed so that a function could
| return a new page.
Replace "page" with "HTML document" (s/page/HTML document/)
| For example: javascript:"<p>Hello</p>" . Using it simply to call a
| function when a link is clicked causes an error in user agents that do not
| support javascript, or have javascript disabled.
That is *not* what happens. Instead, the following cases can occur:
A) No script support or no support for the proprietary `javascript:':
Error message (e.g. in IE 4 with enabled script support)
B) Disabled script support (that requires script support being present,
and usually implies support for "javascript:"):
Animations and other multimedia elements stop working.
Nothing else happens.
C) Script support present and enabled:
Animations and other multimedia elements stop; further accesses
to `location' may fail; other (non-script) links may fail.
Reason: there is no base for (relative) URIs references anymore.
(reported several in de.comp.lang.javascript)
| 4.26 How do I detect Opera/Netscape/IE?
Iff necessary, Netscape 4.x can currently be detected by evaluating
document.layers.
Iff necessary, Opera can currently be detected by evaluating window.opera.
| 4.27 How do I disable the right mouse button?
|
| The oncontextmenu intrinsic event is the only safe and reliable method.
`oncontextmenu' is _not_ an intrinsic event (as specified using this term
starting in HTML 4.01). Instead, it is a (currently) *proprietary* event
_handler_. Whether that could be considered "safe and reliable" is beyond me.
| Note that oncontextmenu is a non-standard event and is not supported on
| all browsers. <body oncontextmenu="return false">
A clear statement that this is not Valid HTML and, more important, not Valid
XHTML unless the attribute is defined in an internal subset, is missing.
Not Valid XML-based markup can make a validating parser to stop parsing
where the first error occurs.
| 4.28 How do I change the confirm box to say yes/no or default to cancel?
It should be added that OK/Cancel may lead to confusion if used with the
wrong question:
Do you want to cancel this operation?
[ OK ] [ Cancel ]
Now what?
| 4.37 How do I POST a form to a new window?
|
| You use the target attribute on the form, opening a window with that name
| and your feature string in the onsubmit handler of the FORM.
|
| <form ... target="wndname"
| onsubmit="window.open('',this.target,'features');return true;">
This should be changed so that it is made clear that an omitted `action'
attribute renders the markup not Valid.
<form action="..." target="..."
onsubmit="window.open('', this.target, 'features'); return true;">
window.open() is also a host object's method that should be tested for, and
one that works asynchronously (if it works). The FAQ should advise that a
wrapper method that does the test and maybe submits the form on timeout is
better than "literally" including the example in one's markup.
| 4.38 How do I download a page to a variable?
|
| Within a web-page, you need to either use java, or the XML HTTP Request
| object, see:
s/a web-page/an (X)HTML document/
I don't see a valid reason why _J_ava should be mentioned first here, or
mentioned at all for that matter. If it is mentioned, one could mention
any programming language that allows to make HTTP requests, especially
server-side (e.g. PHP).
IMHO, mentioning "java" only has the potential to deepen the confusion of
the reader between Java and JavaScript.
| 4.42 How do I open a new window with javascript?
|
| New windows can be opened on browsers that support the window.open
| function and are not subject to the action of any pop-up blocking
| mechanism with code such as:-
|
| if(window.open){
| wRef = window.open("
http://example.com/page.html","windowName");
| }
Either none or a better feature test should be advised, such as
if (/\b(function|object)\b/i.test(typeof window.open) && window.open)
{
wRef = window.open("
http://example.com/page.html", "windowName");
}
| 4.43 How do I get my browser to report javascript errors?
|
| [...]
| There is also a Firebug extension for Mozilla based browsers:
|
http://www.getfirebug.com/
It should be noted that there is the Firebug console for IE and Opera which
may help with debugging scripts there.
[SN: The online resources listed in subsection 3.2 include links to
debuggers. These should be referred to in 4.43 (as well).]
| 4.44 What is AJAX?
s/page/document/
Probably there are more instances of this.
Regarding the FAQ Notes:
-
http://www.jibbering.com/faq/faq_notes/clj_posts.html
| Additional Reading
Sometimes the <~> character is percent-encoded (%7E), sometimes it is not.
RFC3986, section 2.3, recommends *against* encoding it.
| Related draft proposals / work in progress:-
The links are broken. You should employ a tool such as
http://validator.w3.org/checklink before announcing a
new FAQ/FAQ Notes version.
- A better URI management is indicated, maybe using Content Negotiation.
For example, why not
http://www.jibbering.com/faq/notes/
and
http://www.jibbering.com/faq/notes/postings
instead of
http://www.jibbering.com/faq/faq_notes/faq_notes.html
and
http://www.jibbering.com/faq/faq_notes/clj_posts.html?
Thank you for taking the time. I am looking forward to your reply.
Regards,
PointedEars
[snipped PKCS7 signature]
---------------------------------------------------------------------------