Nov 22, 2009

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

free web hosting
Open Discussion & Free Web Hosting > Computers & Tech > How-To's and Tutorials > Websites and Web Designing

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

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

 

 

 


Comment/Reply (w/o sign-up)

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

Comment/Reply (w/o sign-up)

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

Comment/Reply (w/o sign-up)

jcguy
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

Comment/Reply (w/o sign-up)

kraizii88z
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!

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)


See Also,

*SIMILAR VIDEOS*
Searching Video's for page, modified, javascript, check
advertisement



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

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com