Jump to content
xisto Community
Sign in to follow this  
amkint

This Page Was Last Modified On..... useful javascript... check it out

Recommended Posts

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

<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.

Share this post


Link to post
Share on other sites

hey, nice tut, but
check out my tutorial here, it's kinda the same... :) 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 :)) information is mostly stored...

i like that munim.liquidpulse.net too..

Share this post


Link to post
Share on other sites

hey sorry.. didn't know you too posted the same tip :-).. next time will search before i post.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.