I suppose you mean PHP or ASP or similar?

If so, wouldn't this be taking things to an extreme just to do a simple copyright that is already handled so well with this little JS?

Bob

Javascript is for behaviour, not content (or structure, really).
Therefore, if you want to dynamically change a year like that, it
SHOULD be enshrined in markup (which means static or server-side
processing).

On 12/7/05, Bob Schwartz <[EMAIL PROTECTED]> wrote:
Lachlan,

I'm going to take your much appreciated response one bit at a time.

By doing as you suggested, I lose the point of having used the JS in the
first place.

(For the purposes of this discussion, let's assume that having the copyright
notices reflect the current year is a desired thing).
With the JS all copyright notices are automaticaly updated when the year changes, with your method I would have to go back to each site and manualy
change them.
This is sort of the contrary to one of the reasons for seperating structure
from presentation in the "why CSS is good"  argument.

Bob





This one all alone on the page, with no linked JS in the <head>:

<div id="copy">

<script type="text/javascript">

var d=new Date();

yr=d.getFullYear();

if (yr!=2003)

document.write("&copy; "+yr);

</script>&nbsp;Cedar Tree Books

</div>




<p id="copy">(c) 2005 Cedar Tree Books</p>




No script (or entity reference) required.



--
Joshua Street

http://www.joahua.com/
+61 (0) 425 808 469
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************



******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to