Paul,

I agree with you and as I am trying to learn this stuff I'm going one step at a time in the hopes that I can one day "drop the crutches" I needed an example of how to put a js string in a text string.

The next step will be to try and figure out how (I have some examples that I am playing with) to replace existing text with that generated by the js.

The idea being: hard coded in the page would be © 2003 - 2007 Myplace, (the 2003 being the year the site went live) then on Jan. 1st 2008 the js would replace the 2007 with 2008, but if js is turned off it would still say 2007 until such time as the hard coding can be changed.

Is there a server side way of doing it without turning the whole site into PHP or ASP?

Thanks,

Bob



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



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

Reply via email to