Forum Moderators: open
Ok, here is my question. I am trying to put together some JS that will display a link based on the date. IE:
If today's date is 1/5/04 or greater then it will display a link to page number 1. Then if the date is 1/12/05 or greater then display a link to page number 1 and 2, and so on.
Thanks a ton!
I did a couple of G searches on 'date javascript' and came up with some good tutorials. Once you get the date done you could do a little
if (date > something) {
document.write the link
} else {
document.write the other link
}
my JS is very rusty so if that doesn't help, then my apologies, at least it serves as a welcome and a <bump> ;)
<HTML>
<HEAD>
<TITLE>Link Test</TITLE>
<SCRIPT language="JavaScript">
<!-- Hide from non-JavaScript enabled Browsers --
// Date Test
var d = new Date()
if ((d.getMonth()+1 > 1) && (d.getDate() >= 10)){
document.write("<A HREF=http://www.dbimages.com>Click Here</A>");
} else {
document.write("Failure");
}
//--End Hide -->
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Pretty simple just had to go rehash all my JS skills hehe. Thanks for your help folks. :\