by Trieu
2 replies
I like to know how to include a date on a sales page, that updates itself on a daily basis. I've seen many sales page that has this. Do I need to buy a script for this?
#dates #salespage
  • Profile picture of the author lgibbon
    Banned
    Originally Posted by Teo View Post

    I like to know how to include a date on a sales page, that updates itself on a daily basis. I've seen many sales page that has this. Do I need to buy a script for this?
    No, you can get most of them for free.
    I'll send you one by PM
    {{ DiscussionBoard.errors[242826].message }}
  • Profile picture of the author globalpro
    Try this:

    Code:
    <SCRIPT language=JavaScript>
    
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!--  Author: www.cgiscript.net  -->
    
    <!-- Begin
    
    // Get today's current date.
    var now = new Date();
    
    // Array list of days.
    var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday');
    
    // Array list of months.
    var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
    
    // Calculate the number of the current day in the week.
    var date = ((now.getDate()<10) ? "0" : "")+ now.getDate();
    
    // Calculate four digit year.
    function fourdigits(number)	{
    	return (number < 1000) ? number + 1900 : number;
    								}
    
    // Join it all together
    today =  days[now.getDay()] + ", " +
             months[now.getMonth()] + " " +
             date + ", " +
             (fourdigits(now.getYear())) ;
    
    // Print out the data.
    document.write(today);
    
    //  End -->
    </SCRIPT>
    Thanks,

    John
    {{ DiscussionBoard.errors[242828].message }}

Trending Topics