Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> This Page Was Last Modified On....., useful javascript... check it out
amkint
post Feb 26 2005, 12:45 PM
Post #1


Member - Active Contributor
Group Icon

Group: Members
Posts: 86
Joined: 4-February 05
From: Bangalore
Member No.: 2,508



This javascript will show when the page was last modified.
You can replace "This page was last updated on" with your own message..

CODE

<script LANGUAGE="JavaScript">

 function initArray() {  
     this.length = initArray.arguments.length
     for (var i = 0; i < this.length; i++)
     this[i+1] = initArray.arguments[i]

  }

  var DOWArray = new initArray("Sunday","Monday","Tuesday","Wednesday",
                               "Thursday","Friday","Saturday");

  var MOYArray = new initArray("January","February","March","April",
                               "May","June","July","August","September",
                               "October","November","December");

  var LastModDate = new Date(document.lastModified);

  document.write("This page was last updated on ");
  document.write(DOWArray[(LastModDate.getDay()+1)],", ");
  document.write(MOYArray[(LastModDate.getMonth()+1)]," ");
  document.write(LastModDate.getDate(),", ",(LastModDate.getYear()));
  document.write(".");

</SCRIPT>


i have posted some javascripts in munim.liquidpulse.net check that too.
Go to the top of the page
 
+Quote Post
friso
post Feb 27 2005, 07:11 PM
Post #2


Advanced Member
Group Icon

Group: Members
Posts: 142
Joined: 24-November 04
From: Netherlands
Member No.: 1,504



hey, nice tut, but
check out my tutorial here, it's kinda the same... laugh.gif i suppose your method works better, but you can only put it on a site, instead of in the adressbar. my method is meant for plain html sites, which is where encyclopiatic (or whatever tongue.gif) information is mostly stored...

i like that munim.liquidpulse.net too..
Go to the top of the page
 
+Quote Post
amkint
post Feb 28 2005, 07:57 AM
Post #3


Member - Active Contributor
Group Icon

Group: Members
Posts: 86
Joined: 4-February 05
From: Bangalore
Member No.: 2,508



hey sorry.. didn't know you too posted the same tip :-).. next time will search before i post.
Go to the top of the page
 
+Quote Post
jcguy
post Mar 2 2005, 08:07 AM
Post #4


Premium Member
Group Icon

Group: Members
Posts: 382
Joined: 5-September 04
Member No.: 255



I'm not very good at javascript. Actually, how does a javascript know that a page has been modified, automatically? In MS Frontpage there is an applet that does the same thing, but it changes the date only when an update or republishing of the web is done.

How does it work in this case?

Thanks
Go to the top of the page
 
+Quote Post
kraizii88z
post Mar 8 2005, 02:27 AM
Post #5


Advanced Member
Group Icon

Group: Members
Posts: 143
Joined: 17-September 04
From: Seattle::WA
Member No.: 670



munim.liquidpulse.net -nice..

Thanks for the useful script- i was actually looking for one a while back but i'm lazy so it never happened thanx for the snatch!
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Creating Tooltips(7)


 



- Lo-Fi Version Time is now: 8th October 2008 - 12:27 AM