View Full Version : How to add live date without time clock?
ctmom05
12-27-2007, 05:51 PM
I am trying to incorporate each day's current date into my work email without having to manually insert the date on each message.
I have seen scripts for date and time, but I just want the day of the week and the calendar date. IE -> December 27, 2007
Suggestions on that please?
Chris
coothead
12-27-2007, 07:09 PM
Hi there ctmom05,
and a warm welcome to these forums. ;)
Try this, it is pretty basic...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>date only</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {
background-color:#003;
color:#fff;
}
#container {
text-align:center;
margin-top:40px;
}
#date {
font-family:verdana,arial,helvetica,sans-serif;
font-size:20px;
color:#fff;
text-align:center;
background-color:#003;
border:0 solid;
width:190px;
}
</style>
<script type="text/javascript">
window.onload=function(){
now=new Date().toDateString();
document.getElementById('date').value=now;
}
</script>
</head>
<body>
<div id="container">
<input id="date" type="text">
</div>
</body>
</html>
coothead
ctmom05
12-27-2007, 11:19 PM
Now we're getting somewhere. All I have to do is change a couple of very minor things; hopefully I can figure those things out<grin>
Thanks Coot!
coothead
12-28-2007, 06:52 AM
No problem, you're welcome. ;)
ctmom05
12-28-2007, 03:59 PM
Ok Coot.....come on back and help me some more - please.
I thought I had this thing down pat. I was practicing on an HTML editor site and got the date, just the way I wanted; in the right place too.
The problem is that somehow:mad: I cannot transfer what I have done to where I need it. I use a web-based email program at work and wanted to incorporate this date function into my work emails.
Any idea on what the next step should be?
coothead
01-03-2008, 03:12 PM
Hi there ctmom05,
I use a web-based email program at work and wanted to incorporate this date function into my work emails.
Ah, emails. :eek:
You may well have a problem there. ;)
I have Outlook Express on my pc and it does not accept javascript a.f.a.i.k.
There may well be a block on other email programs also.
You really need to check with your administrator about this.
coothead
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.