By this simple piece of java script code you can say good morning , good evening ,……. To the logged in user . The logic is quite simple the web page takes the system time and according to the time part the messages are created and displayed so messages are displayed regardless of the country time.
glow.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="glow.aspx.cs" Inherits="glow" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
<title>title>
<script type ="text/jscript" language = "JavaScript">
function partoftheday() {
pageDate = new Date()
var hours = pageDate.getHours()
if (hours < 5)
return "Nice to see you here !!!!!"
if (hours < 12)
return "Good Morning"
if (hours < 16)
return "Good Afternoon"
if (hours >16 && hours <24)
return "Good Evening"
}
head>
<body >
<div>
<form id="form1" runat="server">
<div><h1 style="color: #33CCCC">Welcome to our Web site h1>div>
<script type ="text/jscript" language = "JavaScript">
var message = partoftheday() + "." + "<P>"
message = message.bold().fontsize(5)
document.write(message)
var mainheading = "Hope you will enjoy".bold().blink()
document.write(mainheading)
script>
form>
div>
body>
html>
Screenshot 1

Screenshot 2

Screenshot 3
