<?PHP>
24-06-2007, 03:57 AM
Hey all, I was bored So i thought i would do some tuts on some scripts.
This One Is Called: Greeting
What It Does: It gives your sites visitors an Alert Box When They Visit your site, saying an appropriate greeting e.g Good Morning If Its Morning
On A Scale Of 1 To 5 How Difficult Is It To Use?:2
What Is The Script Code?:
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL DAILY GREETING: 1. Copy the coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the BODY of your HTML document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!-- Beginvar Today=new Date();var ThisDay=Today.getDay();var ThisDate=Today.getDate();var ThisMonth=Today.getMonth()+1;var ThisYear=Today.getFullYear(); //included if you wish to insert the yearfunction DayTxt
(DayNumber) {var Day=new Array();Day[0]="Sunday";Day[1]="Monday";Day[2]="Tuesday";Day[3]="Wednesday";Day[4]
="Thursday";Day[5]="Friday";Day[6]="Saturday";return Day[DayNumber];}var DayName=DayTxt(ThisDay);function MonthTxt (MonthNumber)
{var Month=new Array();Month[1]="January";Month[2]="February";Month[3]="March";Month[4]="April";Month[5]="May";
Month[6]="June";Month[7]="July";Month[8]="August";Month[9]="September";Month[10]="October";Month[11]="November";Month[12]="December";return Month[MonthNumber];}var MonthName=MonthTxt(ThisMonth);var d = new
Date();var h = d.getHours();document.write("<TABLE BORDER=3 BGCOLOR=WHITE WIDTH=75 HEIGHT=85 align=left>"+"<TD>"+"<p align=center>"+"<font size=-2 >"+DayName+"<br>"+"<font color=orangered size=+3 >"+ThisDate+"</font>"+"<br>"+MonthName+"<br>"+"</b>"+"</font>"+"</p>"+"</TD>"+"</TR>"+"</TABLE>");if (h < 2) document.write("<P ALIGN=center>"+"<b>
<!-Here are the editable greetings:-!>
"+"Good morning! Yes, it's way past midnight."+"</b>"+"</P>");else if (h < 3) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up early or working late?"+"</b>"+"</P>");else if (h < 7) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up bright and early!"+"</b>"+"</P>");<-!/////below are the greetings that you can edit-->else if (h < 12) document.write("<P ALIGN=center>"+"<b>"+"Good morning!"+"</b>"+"</P>");else if (h < 17) document.write("<P ALIGN=center>"+"<b>"+"Good afternoon!"+"</b>"+"</P>");else if (h < 23) document.write("<P ALIGN=center>"+"<b>"+"Good evening!"+"</b>"+"</P>");else document.write("<P ALIGN=center>"+"<b>"+"A late good evening! Not much left of it now."+"</b>"+"</P>");// End --></script><!-- END OF SCRIPT -->Need Any Help With The Script PM Me Or email me on [email protected]
This One Is Called: Greeting
What It Does: It gives your sites visitors an Alert Box When They Visit your site, saying an appropriate greeting e.g Good Morning If Its Morning
On A Scale Of 1 To 5 How Difficult Is It To Use?:2
What Is The Script Code?:
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL DAILY GREETING: 1. Copy the coding into the BODY of your HTML document -->
<!-- STEP ONE: Paste this code into the BODY of your HTML document -->
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!-- Beginvar Today=new Date();var ThisDay=Today.getDay();var ThisDate=Today.getDate();var ThisMonth=Today.getMonth()+1;var ThisYear=Today.getFullYear(); //included if you wish to insert the yearfunction DayTxt
(DayNumber) {var Day=new Array();Day[0]="Sunday";Day[1]="Monday";Day[2]="Tuesday";Day[3]="Wednesday";Day[4]
="Thursday";Day[5]="Friday";Day[6]="Saturday";return Day[DayNumber];}var DayName=DayTxt(ThisDay);function MonthTxt (MonthNumber)
{var Month=new Array();Month[1]="January";Month[2]="February";Month[3]="March";Month[4]="April";Month[5]="May";
Month[6]="June";Month[7]="July";Month[8]="August";Month[9]="September";Month[10]="October";Month[11]="November";Month[12]="December";return Month[MonthNumber];}var MonthName=MonthTxt(ThisMonth);var d = new
Date();var h = d.getHours();document.write("<TABLE BORDER=3 BGCOLOR=WHITE WIDTH=75 HEIGHT=85 align=left>"+"<TD>"+"<p align=center>"+"<font size=-2 >"+DayName+"<br>"+"<font color=orangered size=+3 >"+ThisDate+"</font>"+"<br>"+MonthName+"<br>"+"</b>"+"</font>"+"</p>"+"</TD>"+"</TR>"+"</TABLE>");if (h < 2) document.write("<P ALIGN=center>"+"<b>
<!-Here are the editable greetings:-!>
"+"Good morning! Yes, it's way past midnight."+"</b>"+"</P>");else if (h < 3) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up early or working late?"+"</b>"+"</P>");else if (h < 7) document.write("<P ALIGN=center>"+"<b>"+"Good morning! Up bright and early!"+"</b>"+"</P>");<-!/////below are the greetings that you can edit-->else if (h < 12) document.write("<P ALIGN=center>"+"<b>"+"Good morning!"+"</b>"+"</P>");else if (h < 17) document.write("<P ALIGN=center>"+"<b>"+"Good afternoon!"+"</b>"+"</P>");else if (h < 23) document.write("<P ALIGN=center>"+"<b>"+"Good evening!"+"</b>"+"</P>");else document.write("<P ALIGN=center>"+"<b>"+"A late good evening! Not much left of it now."+"</b>"+"</P>");// End --></script><!-- END OF SCRIPT -->Need Any Help With The Script PM Me Or email me on [email protected]