This site is READ ONLY!! No support will be given! Everything in here is just for archiving purposes!

Title Date

Miscellaneous BBCodes, including MOD BBCodes which usually require file edits.
Locked
User avatar
cisco007
Ciscox
Ciscox
Posts: 2843
Joined: Thu Sep 16 2010 3:25 pm
Country Flag: Mexico

Title Date

Post by cisco007 »

Title: Title Date
Description: Adds date to Browser title bar
Author(s)/or Link: cisco007
Code taken from here: http://www.dynamicdrive.com/dynamicindex6/titledate.htm

bbcode usage:

Code: Select all

[titledate][/titledate]
HTML replacement:

Code: Select all

<script type="text/javascript">
/*<![CDATA[*/

//date in title by Randall Smith copyright 1999
//Permission given to Dynamicdrive.com to feature it in it's DHTML archive
//Script modified by Dynamicdrive.com to make it cross browser friendly. Visit Dynamicdrive.com for more DHTML scripts
//please visit me on the web at http://members.xoom.com/u4rstunzd/
//and to change the title:where it says Welcome todays date is: just put you own text in if you would like to--
var isnMonth = new
Array("January","February","March","April","May","June","July","August","Septerber","October","November","December");
var isnDay = new
Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
today = new Date () ;
Year=today.getYear();
if (Year < 1000)
Year+=1900
Date=today.getDate();
function setdate(){
document.title="Today\'s date is: "+isnDay[today.getDay()]+", "+isnMonth[today.getMonth()]+" "+Date+", "+Year+""
}
if (document.all)
setdate()
else if (document.getElementById)
window.onload=setdate
/*]]>*/
</script>
Helpline:

Code: Select all

[titledate][/titledate]
Example:

Code: Select all

[titledate][/titledate]
Notes:
which means you leave empty!
tested on Firefox 16.0.1, IE 8, and Opera 12.02

DEMO:
this topic
[titledate][/titledate]
Image
Locked