today's date, e-mail link

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

tow quick questions:

1. Can anyone explain how I can get the date to show up on my site - not
the date the site was modified but the date that it is when a person views my
site. (if that makes any sense)

2. I want to put a link on my site for people to e-mail a link to my
website to their friends. I can get the e-mail link, with the sender's info
filled in but I can't figure out how to put anything in the body of the
message. Any thoughts?

thanks in advance.

jaime.
 
Jaime said:
tow quick questions:

1. Can anyone explain how I can get the date to show up on my
site - not
the date the site was modified but the date that it is when a person
views my
site. (if that makes any sense)

Look under "D" for other date codes in the link inside the following
code, but the following should take care of the date:
********************************
<SCRIPT LANGUAGE="JavaScript1.2">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) // Y2K Fix, Isaac Powell
year = year + 1900; // http://onyx.idbsu.edu/~ipowell
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End --></font>
</SCRIPT>*************************http://www.geocities.com/aviontravelcade/How
it looks on an old site I did years ago.Tom J
 
I"ll give it a try - thanks!

Tom J said:
Jaime said:
tow quick questions:

1. Can anyone explain how I can get the date to show up on my
site - not
the date the site was modified but the date that it is when a person
views my
site. (if that makes any sense)

Look under "D" for other date codes in the link inside the following
code, but the following should take care of the date:
********************************
<SCRIPT LANGUAGE="JavaScript1.2">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) // Y2K Fix, Isaac Powell
year = year + 1900; // http://onyx.idbsu.edu/~ipowell
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End --></font>
</SCRIPT>*************************http://www.geocities.com/aviontravelcade/How
it looks on an old site I did years ago.Tom J
 
Here is a simple method - not much code

In JS
function getTheDate()
{ var now = new Date()
return now.toLocaleDateString()}

function getTheTime()
{ var now = new Date()
return now.toLocaleTimeString()}

function DateTime()
{ var cdate = '<b class="red">'
+ getTheDate() + " "
+ getTheTime() + "</b>"
if (document.all)
document.all.clock.innerHTML = cdate
else
if (document.getElementById)
document.getElementById("clock").innerHTML = cdate
else
document.write(cdate)}

function gettime()
{ setInterval("DateTime()",1000) }

in HTML
<html>
.....
<body onload="gettime();" >
Current Date: <span id="clock"></span>
.....

This is actually a ticker - the date and time update every second. But you
may like it as is or adapted to your preference

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au

Tom said:
Jaime said:
tow quick questions:

1. Can anyone explain how I can get the date to show up on my
site - not
the date the site was modified but the date that it is when a person
views my
site. (if that makes any sense)

Look under "D" for other date codes in the link inside the following
code, but the following should take care of the date:
********************************
<SCRIPT LANGUAGE="JavaScript1.2">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) // Y2K Fix, Isaac Powell
year = year + 1900; // http://onyx.idbsu.edu/~ipowell
document.write("<center>" + lmonth + " ");
document.write(date + ", " + year + "</center>");
// End --></font>
</SCRIPT>*************************http://www.geocities.com/aviontravelcade/How
it looks on an old site I did years ago.Tom J


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
RE Q2.

Try this
<a href="mailto:username?subject=subjecttext&body=bodytext"></a>
where
subjecttext is the text of the subject
bodytext is the text of the body
--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au
tow quick questions:

1. Can anyone explain how I can get the date to show up on my site -
not the date the site was modified but the date that it is when a
person views my site. (if that makes any sense)

2. I want to put a link on my site for people to e-mail a link to my
website to their friends. I can get the e-mail link, with the
sender's info filled in but I can't figure out how to put anything in
the body of the message. Any thoughts?

thanks in advance.

jaime.


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
Back
Top