Search results for 'newCheck'. 1 post(s) found.
- 2007/08/30 New content notifier in Javascript
Use this Cookie to show your visitors what's new on your Web site since their last visit.
newYou.js
now = new Date
expireDate = new Date
expireDate.setMonth(expireDate.getMonth() 6)
lastVisit = new Date(cookieVal("pageVisit"))
document.Cookie = "pageVisit=" now ";expires=" expireDate.toGMTString()
function cookieVal(CookieName) {
thisCookie = document.Cookie.split("; ")
for (i=0; i<thisCookie.length; i ) {
if (CookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1]
}
}
return "1 January 1970"
}
function newCheck(yyy,mm,dd) {
lastChgd = new Date(yyy,mm-1,dd)
if (lastChgd.getTime() > lastVisit.getTime()) {
document.write("<img src='/img/new-to-you/new.gif' alt='new'>")
}
}
expireDate = new Date
expireDate.setMonth(expireDate.getMonth() 6)
lastVisit = new Date(cookieVal("pageVisit"))
document.Cookie = "pageVisit=" now ";expires=" expireDate.toGMTString()
function cookieVal(CookieName) {
thisCookie = document.Cookie.split("; ")
for (i=0; i<thisCookie.length; i ) {
if (CookieName == thisCookie[i].split("=")[0]) {
return thisCookie[i].split("=")[1]
}
}
return "1 January 1970"
}
function newCheck(yyy,mm,dd) {
lastChgd = new Date(yyy,mm-1,dd)
if (lastChgd.getTime() > lastVisit.getTime()) {
document.write("<img src='/img/new-to-you/new.gif' alt='new'>")
}
}
test.html
<html>
<head>
<title>kurapa.com test</title>
<script type="text/javascript" src="newYou.js"></script>
</head>
<body>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,11)</script> Be sure to check out our new scripts!
<br>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,3)</script> Have you seen our Tutorials?
</body>
</html>
<head>
<title>kurapa.com test</title>
<script type="text/javascript" src="newYou.js"></script>
</head>
<body>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,11)</script> Be sure to check out our new scripts!
<br>
<script type="text/javascript" language="JavaScript"> newCheck(2005,2,3)</script> Have you seen our Tutorials?
</body>
</html>
Another posts included in "HTML, Javascript"
| Cookie Redirect (1) | 2007/08/30 |
| Cookie enabled browser checking in Javascript (0) | 2007/08/30 |
| Access Granted (0) | 2007/08/30 |
| Let popup once for event dialog or something like that in Javascript (0) | 2007/08/30 |
| Save And Restore Form Cookies in Javascript (0) | 2007/08/30 |
| How to record visitor's name by Cookie (0) | 2007/08/29 |
| Javascript & Cookie based Visitor Application (0) | 2007/08/29 |
| Cross Browser Event Management Functions Using JavaScript (0) | 2007/08/29 |
Trackback : Cannot send a trackbact to this post.
-
Subject different money making ideas
2010/01/29 00:01
moneyideas
-
Subject different money making ideas
2010/01/29 08:23
moneyideas
-
Subject different money making ideas
2010/01/31 16:44
moneyideas

Prev

Rss Feed