Nick,

Thanks. Now that I see how you have done it, I may be able to guess my way through the others I have to do.

Is there a "(" missing in the second line of your version?

On 1 Mar 2007, at 14:44:59, Bob Schwartz wrote:

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");
  var txt1 = document.createTextNode("© ");
   var year = new Date().getFullYear();
   var now = year;
   var txt2 = document.createTextNode()
  var txt3 = document.createTextNode(" FIFe");
  para.appendChild(txt1);
  para.appendChild(txt2);
  para.appendChild(txt3);
  var testdiv = document.getElementById("testdiv");
  testdiv.appendChild(para);
}


Not sure how "FIFe" fits into all this, but...

window.onload = function() {
   var year = new Date().getFullYear();
   var text = "© " + year + " myplace");
   var p = document.createElement("p");
   p.appendChild(document.createTextNode(text));
   document.getElementById("testdiv").appendChild(p);
}

should do what the original code does. If somebody gets a time machine up and running and goes back to 2003, well, they'll see the version of the site from back then anyway, so that's OK :-)

HTH,

Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/





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





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

Reply via email to