Tuesday, December 1st, 2009

Ok, so imagine that I have an HTML image map and I want to have the links clickable only on or after certain dates. (Yep: Advent calendar!) Is there a nice quick easy Javascript way of doing this? My google-fu and /or my brain are not asking the right questions. And I am running out of coding time ...

(Logic basically: IF TODAY > X THEN LINK = Something Useful ELSE LINK = Stay Put)

Edit: I know how to use the date functions in Javascript and I know how to check the current date against a number. What I don't know is how to make the link dependent on the result.

Further edit: no more LJ til late this evening ...

March 2026

S M T W T F S
1 2 3 4 567
8 9 1011 121314
15 16 17 18 192021
22 23 24 25 26 2728
293031    

Most Popular Tags

Expand Cut Tags

No cut tags