trying to determine why this scripts not working
contents of JavaScriptJS/date.js:

var myDate = "09/10/2013"
document.write("Copyright © 2002-2013 All rights reserved.")<br />
document.write("This page last updated: " + myDate);
what is wrong ?
Who is Participating?
RobConnect With a Mentor Owner (Aidellio)Commented:
ok there's no semicolon after mydate or your first document.write:

should be:

var myDate = "09/10/2013";
There shouldn't be a <br/> tag outside your document.write... should be inside:

document.write("Copyright © 2002-2013 All rights reserved.<br />");

document.write("This page last updated: " + myDate);
Rikin ShahConnect With a Mentor Microsoft Dynamics CRM ConsultantCommented:

Try myDate.toString();

And <br> should be part of string.

document.write("Copyright © 2002-2013 All rights reserved. <br />")
RobOwner (Aidellio)Commented:
The Date is ok the way you have it.  It's a string so doesn't need to be converted.

Here is a demo of it working:
isnoend2001Author Commented:
Thanks. That fixed it
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.