Need a geek? Geeks to Go offers free, quality tech support -- in terms anyone can understand. Volunteers are waiting to help, friendly, technology experts who have knowledge to share, and enjoy helping others. Feel free to browse the site as a guest. However, you must log in to reply to existing topics, or to start a new topic of your own. Other benefits of joining include richer forum features, and removal of all advertising. Learn more in our Welcome Guide Infected? Malware and Spyware Cleaning Guide. What are you waiting for? Click here to join for free today!
 
Reply to this topicStart new topic
help editing a javascript
thero_cpd
post Jun 27 2009, 02:41 PM
Post #1


Member
**
Posts: 95
OS: windows xp



help with the following javascript code
could someone explain how this code would work? i need to understand it, and is it possible to make the link disapear on a certin date, and can you refine the appear and disapear to a specific time as well?

script><script type="text/javascript">
var display_date=new Date('04/04/2008');//this will be the date the link starts displaying
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
//get all dates in the same format
var current_date = new Date(month +'/' + day + '/' + year);
if(current_date>=display_date){
document.write('<a href="newlink.html">new link</a>');
}
</script>

This post has been edited by thero_cpd: Jun 27 2009, 02:44 PM
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No new 19 / 1,619 12th June 2005 - 08:20 PM
XOXclueless_kcXOX started - last by ssone
No New Posts   3 / 518 13th July 2008 - 11:12 PM
Jacksown started - last by Jacksown
No New Posts 0 / 350 29th August 2008 - 04:14 PM
emaan9301 started - last by emaan9301
No New Posts 0 / 124 21st October 2009 - 03:03 PM
scherisaki started - last by scherisaki

RSS Time is now: 21st November 2009 - 11:48 PM

Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. All trademarks mentioned on this page are the property of their respective owners.

© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy | Advertising