Happy New Year!!! (Can you update my website?)

This is a discussion on "Happy New Year!!! (Can you update my website?)" within the Web Page Design section. This forum, and the thread "Happy New Year!!! (Can you update my website?) are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 27th, 2007, 18:39
Junior Member
Join Date: Jul 2007
Location: Dallas, TX
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Happy New Year!!! (Can you update my website?)

I know it's early, but here's a handy little tip that can save you the hassle of updating the copyright information on the bottom of every page you have ever built once January 1st rolls around.

Just insert a snippet of javascript that asks the browser what year it currently is, and then prints it using 'document.write'.

This will ensure that the copyright information on a website is always current...even at 12:01am on New Years Eve!

Now you won't have to spend the first week(s) of your New Year doing something as boring as updating copyright dates!

(For the following example we are assuming that your copyright is in a 'footer' DIV and styled accordingly.)

Here's all you need:
Code: Select all
<div id="footer">
   <p>Copyright  &copy;
   <script type="text/javascript">
   var d=new Date()
   document.write([d.getFullYear()])
   </script>
   Acme Widget Corporation.  All rights reserved.
   </p>
</div>
Easy cheesy!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 27th, 2007, 19:33
Highly Reputable Member
Join Date: Jun 2007
Location: Canterbury
Age: 20
Posts: 726
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Happy New Year!!! (Can you update my website?)

lol with all your useful little snippets you should have yourself a blog

Cheers mate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 27th, 2007, 20:23
Reputable Member
Join Date: Apr 2007
Location: Ireland
Age: 15
Posts: 332
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Happy New Year!!! (Can you update my website?)

I think I'll stick to PHP includes. Thanks for the useful code, though!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
date, html, javascript, new year, tips, update

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
WOTY - Website of the Year 2007 - Voting Marc Entry, Nominations and Voting 29 Dec 26th, 2007 17:17
Merry Christmas and Happy New Year! mcdanielnc89 Webforumz Cafe 13 Dec 19th, 2007 11:37
Happy New Year Sabin_33 Webforumz Cafe 47 Jan 8th, 2007 10:16


All times are GMT. The time now is 21:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42