date and time in dreamweaver

  mco 12:13 20 May 2006

Bear with me; this is only my second day on dreamweaver and I've already posted another thread lower down...I've inserted 'the date' on several pages, as offered by dreamweaver,but when I've uploaded and viewed online it doesn't tell the correct time - in fact, they all have different times presumably when I modified the page. Am I right to assume it is an actual clock? Or is it just a 'date and time last modified' insertion? (In which case I'll find my own)

  RicScott 15:33 20 May 2006

Usually in web design, the date and time is actually produced by the server..try this javascript code instead.

Put this bit in the <head> section </head>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">

var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();


And put this bit where you want the date and time to show up on the page:

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
document.write(TODAY); </SCRIPT>

Hope this helps...

  mco 00:43 21 May 2006

I've got rid of the original date and put a real clock in and it now works fine.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

The Evil Within 2 review-in-progress

Photoshop CC 2018 released with new Curvature Pen and better brush tools

Camera tips to take better iPhone photos

Les meilleures applications de covoiturage 2017