At 3/1/2007 02:32 AM, Bob Schwartz wrote:
I am in the process of converting my javascript library to
nonobtrusive js.
...
At 3/1/2007 06:44 AM, Bob Schwartz wrote:
I'll start with the easy one first:
var d=new Date();yr=d.getFullYear();if
(yr!=2003)document.write ("© "+yr); myplace
which gives me: © 2007 myplace
Here's my pathetic attempt:
window.onload = function() {
var para = document.createElement("p");
... etc.
Bob,
I'm glad you're getting help with your javascript problem. However:
Unobtrusive javascript doesn't just mean
separation of the script from the markup, it is
also the use of javascript that doesn't break the
page when scripting is disabled.
http://onlinetools.org/articles/unobtrusivejavascript/chapter1.html
For example, a hyperlink that reloads the page
with new content can be morphed by javascript to
display the new content immediately without
returning to the server. Regardless of whether
javascript is enabled, the new content shows
up. Unobtrusive javascript enhances the page but
the page doesn't DEPEND on javascript.
Your use of javascript to display a copyright
notice means that the copyright won't be
displayed when javascript isn't running. This
isn't unobtrusive, it's obtrusive. It's like
printing a book with a copyright notice that
shows up only in artificial light but is
invisible in daylight. I can't imagine you're
protecting your client's intellectual property
rights by generating the copyright notice in such
a fragile way. Please generate the notice
server-side -- or hard-code it into the html --
so it shows up for everyone viewing the content.
Regards,
Paul
__________________________
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************