|
The Automatic Date
Trick
Today is
Nothing surprising there!
And I'm sure that you know that
I don't open up my web editing software every day just
so that I can change the date. Of course not! It's
all done with a few lines of JavaScript which picks
up the date information from the visitor's computer
and displays it on the web page. Here's the full script
if you want to copy it:
<script
language="JavaScript">
<!--
var days=new Array(8);
days[1] = "Sun";
days[2] = "Mon";
days[3] = "Tue";
days[4] = "Wed";
days[5] = "Thu";
days[6] = "Fri";
days[7] = "Sat";
var months=new Array(13);
months[1] = "Jan";
months[2] = "Feb";
months[3] = "Mar";
months[4] = "Apr";
months[5] = "May";
months[6] = "Jun";
months[7] = "Jul";
months[8] = "Aug";
months[9] = "Sep";
months[10] = "Oct";
months[11] = "Nov";
months[12] = "Dec";
var dateObj=new Date()
var wday=days[dateObj.getDay() + 1]
var lmonth=months[dateObj.getMonth() + 1]
var date=dateObj.getDate()
var year=dateObj.getYear()
if (year >= 100 && year <= 1999)
{year=year + 1900}
else
{year=year}
document.write(wday + ", " + date+ " " + lmonth + " " +
year)
// -->
</script>
If you want to put in the full
word for "Mon" or
"Jan", you just need to change the wording
in the script.
You'll have been on to many websites
(including some of mine) which have something like:
"From The Desk Of Joe Bloggs", followed by the
current date.
And you know what? Sometimes, if
you scroll to the end of the page, you'll see something
like:
© 2005
It's a bit of a giveaway, isn't
it. There's the guy trying to make out that the page
is fresh and new, and there's the copyright notice
proclaiming that the page is a couple of years old.
But it's really very simple to
modify the script, making it shorter, so that only
the current year is picked up from the visitor's computer
and then using it to display a copyright date. Here's
the full code:
©
<script language="JavaScript">
<!--
var year=dateObj.getYear()
if (year >= 100 && year <= 1999)
{year=year + 1900}
else
{year=year}
document.write(year)
// -->
</script>
And here it is in action:
©
If you don't believe me, try altering
the year temporarily on your computer's clock and then
refresh this page! (I'm not responsible if this triggers
off all sorts of date-related activities on your computer!)
The "©",
incidentally, is simply the HTML for inserting the
copyright symbol.
So, it's really easy to insert
code such as this at the end of all of your web pages,
convincing the visitor that the pages really have been
built in the current year!
Of course, you can take the basic
date script and do a lot more with it. For example,
instead of (or maybe as well as) having the copyright
year at the bottom of the page, you could use the words "This
page last updated on" - and add the script to
insert the current date. You can leave out the day
of the week simply by deleting
"wday
+ ", " + "
from the line starting "document.write".
Then it looks as if you updated the page on that very
same date - today.
And then there's the "Special
Offer Only Available Until". That also uses a
similar script, pulling the date off the visitor's
computer and adding "x" days to it. That's
a little trickier, and I'm not going to go into details
now - maybe some other time.
But you can see how a little Javascript
on your web page can give your visitors an impression
of your page being right up to date. And don't forget,
whilst you might be well aware that
there's trickery going on, a lot of your website visitors
will be blissfully ignorant :-)
I hope you've found this useful.
|
Pop-ups. Pop-unders. Sliding
pop-ins. They're all looking a bit stale now,
aren't they!
Isn't
there something else? Something that
is less intrusive yet more effective. A type
of advertisement that makes my customers WANT
to see it, instead of repelling them from your
site?
YES!
Finally There Is!
It's
a New Breed of Ads that's not only pleasing
to the eye, but also incredibly effective in
drawing in your customer's attention, causing
them to click, and most importantly getting more
of them to reach for their wallets because they're
actually interacting with your ads now instead
of running from them.
BUT...These Non
Intrusive, Super Effective ads have been available
only to Big Corporations with
deep advertising pockets...
Until
Now!
When I first saw "Peel
Away Ads" in action, I just had to
get it. It was
at a "pocket money" price.
Then, I just had to
invest in buying the Resale Rights to it. And
I've slashed the price even lower.
Click
here to learn more - and to see this incredible
ad in action
|
|