Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q926 How can I automate a text link so that its links to the current months "What's New" page?

irt.org | Knowledge Base | JavaScript | Link | Q926 [ previous next ]

Q926 How can I automate a text link so that its links to the current months "What's New" page?

This one is easy:

<A HREF="default.htm" onClick="now=new Date();this.href='month' + (now.getMonth() + 1) + '.htm'">What's New</A>

Which will link to one of twelve pages: month1.htm through to month12.htm, depending on the current month.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.