Tech Support Forum banner

last modified/updated script

1376 Views 3 Replies 3 Participants Last post by  Michelangelo
I had this thread in the other forum, but this seems more appropriate.

I would like to know if anyone has a javascript that I can use for posting the time and date that a certain page of my website was updated. I've tried to use various scripts but all they do is tell the last time the page was refreshed , not the last time I updated them. I use Mozilla Firefox, if that has anything to do with my problem.
Status
Not open for further replies.
1 - 4 of 4 Posts
Hmm.. To Tell You the Truth, Not sure what you want :sayno:

As I am unaware of exactly what you wanted, I got the gist of your problem. In this case I have added a live clock using a form.

Here it is:

Code:
<form name="Tick">
<input type="text" size="12" name="Clock">
</form>

<script>
function show()
{
var Digital=new Date()
var hours=Digital.getHours()
var minutes=Digital.getMinutes()
var seconds=Digital.getSeconds()
var dn="AM"
if (hours>12)
{
dn="PM"
hours=hours-12
//this is so the hours written out is
//in 12-hour format, instead of the default //24-hour format.
}
if (hours==0)
hours=12
//this is so the hours written out
//when hours=0 (meaning 12a.m) is 12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
document.Tick.Clock.value=
hours+":"+minutes+":"+seconds+" "+dn
setTimeout("show()",1000)
}
show()
</script>
If that is not what you wanted, please elaborate a little more on your problem. :wink:

Have a fun and computing day,
Grove :cool:
See less See more
Re:

Sorry, I'll try to clear it up a little more. What I want to do is let the people viewing my webpage see when was the last time I <i>updated</i> my website. I am using the coding below, but it doesn't seem to work.

Code:
<script language="JavaScript" type="text/javascript">
document.write(document.lastModified);
</script>
If it helps any more, visit the webpage I made at http://www.freewebtown.com/fvpcyouthgroup.

Thanks for helping!
See less See more
I just type that in everytime I update, cause I don't think someone else's computer could know when you updated. (unless it is in the file's properties, in which case... maybe) but I always just type in the date myself.
1 - 4 of 4 Posts
Status
Not open for further replies.
Top