On 02/03/2007, at 6:34 PM, Paul Novitski wrote:

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]
*******************************************************************




Thanks Paul,

Also consider in the head meta tags, a link to copyright statement:
<link rel="Copyright" href="Copyright.html" />

And in the page body put somewhere
&copy; myplace 2007.

Add the copyright statement for non javascript users
 <noscript>&copy; myplace 2007. </noscript>

Tim

The Editor
Heretic Press
http://www.hereticpress.com
Email [EMAIL PROTECTED]



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to