Layers not showing from variable triggers


I have been looking to find a way to insert an expiry date trigger within my learning to restrict access by clients beyond a certain date. I have inserted javascript obtained from this great discussion forum that does just that  but I cannot get the appropriate layers to activate from the variable states created from the java script.  

E.g. I want a layer showing the course has expired if the date exceeds the expiry date and I want the course to continue as normal if date is within the date licence.

Any help would be appreciated.




2 Replies