Need date and time script for sales page

15 replies
I'm looking for a date and time script that I can load onto my sales pages so that it looks like this...........



From The Desk Of:
Thrusday, October 2, 2008
7:59am


Does anyone have one......


Thanks
txmom64
#date #page #sales #script #time
  • Profile picture of the author Emilian
    Hi Texasmom,

    Here is a simple one.

    Code:
    <script type="text/javascript">
    
    var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
    var months = ['January','February','March','April','May','June','July','August','September','October','November','December']
    
    var current = new Date();
    
    document.write(days[current.getDay()] + ", " + months[current.getMonth()] + current.getDate() + ", " + current.getFullYear());
    </script>
    Just put that script where you want the date to appear
    {{ DiscussionBoard.errors[145916].message }}
  • Profile picture of the author texasmom64
    was there anything that was suppose to in the white box under the word (code
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[145934].message }}
  • Profile picture of the author Emilian
    Yes, do you see the code now? I just updated it.

    Made the code a bit smaller.
    {{ DiscussionBoard.errors[145941].message }}
  • Profile picture of the author texasmom64
    It's not working......its showing just was i copied into the html code when i preview it.
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[145943].message }}
  • Profile picture of the author Emilian
    Where are you uploading it? Can I see it?

    The version up there right now works. I just tested it.
    {{ DiscussionBoard.errors[145946].message }}
  • Profile picture of the author texasmom64
    i'm creating my page in frontpage.......here's what it looks like on my preview:

    From The Desk Of: Lavonda Thigpen
    <script type="text/javascript"> var days = new Array(7); var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday' ,'Friday','Saturday'] var months = ['January','February','March','April','May','June', 'July','August','September','October','November',' December'] var current = new Date(); document.write(days[current.getDay()] + ", " + months[current.getMonth()] + current.getDate() + ", " + current.getFullYear()); </script> </SPAN></B>
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[145948].message }}
  • Profile picture of the author texasmom64
    I'm new to this so more than likely, i'm doing something wrong so beware.....you've got a programer newbie on your hands.....i did'nt use to have to do this.....my webmaster, the guy that built my first website, quit, so now i'm in a bit of a pickel
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[145955].message }}
  • Profile picture of the author Emilian
    That should work.

    Upload it to your site that way I can run my debugger and see if anything is wrong with it.
    {{ DiscussionBoard.errors[145956].message }}
  • Profile picture of the author Emilian
    This is where I have uploaded mine: Tutorials

    You can see it there in the middle.
    {{ DiscussionBoard.errors[145960].message }}
  • Profile picture of the author Emilian
    Double post.
    {{ DiscussionBoard.errors[145966].message }}
  • Profile picture of the author texasmom64
    OK.....I got it.....I had to take out some junk around the <script> and </script> tags.......Thank you so much for all your hlep....you've been a lifesaver......just one other question.....

    How can I change the font and the font color?
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[145977].message }}
  • Profile picture of the author Emilian
    Great

    Just change the entire document.write() statement with this one:

    Code:
    document.write("<span id='date'>"+days[current.getDay()] + ", " + months[current.getMonth()] + current.getDate() + ", " + current.getFullYear()+"</span>");
    Then in your CSS file add an id like so:

    Code:
    #date { color: #000000; font-family: Verdana;}
    Just change the color and font to whatever suits you

    Here is the entire (updated) script:

    Code:
    <script type="text/javascript">
    
    var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
    var months = ['January','February','March','April','May','June','July','August','September','October','November','December']
    
    var current = new Date();
    
    document.write("<span id='date'>"+days[current.getDay()] + ", " + months[current.getMonth()] + current.getDate() + ", " + current.getFullYear()+"</span>");
    </script>
    {{ DiscussionBoard.errors[145986].message }}
  • Profile picture of the author texasmom64
    great.....it's working......promise this is last question:

    how do i put a (space) after the word October? This is what it looks like now!!

    Thursday October2, 2008
    Signature

    Are You Desperately Trying To Earn An Income Online, But No Matter How Hard You Try, It Just Ain't Happening?

    Extreme Newbie Income Can Help!

    {{ DiscussionBoard.errors[146102].message }}
    • Profile picture of the author Emilian
      Here it is:

      Code:
      <script type="text/javascript">
      
      var days = ['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday']
      var months = ['January','February','March','April','May','June','July','August','September','October','November','December']
      
      var current = new Date();
      
      document.write("<span id='date'>"+days[current.getDay()] + ", " + months[current.getMonth()] + " " + current.getDate() + ", " + current.getFullYear()+"</span>");
      </script>
      That should do it
      {{ DiscussionBoard.errors[146295].message }}
      • Profile picture of the author adilim
        <SCRIPT LANGUAGE="JavaScript">


        <!-- Begin

        // Get today's current date.
        var now = new Date();

        // Array list of days.
        var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thu rsday','Friday','Saturday');

        // Array list of months.
        var months = new Array('January','February','March','April','May',' June','July','August','September','October','Novem ber','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>
        {{ DiscussionBoard.errors[345669].message }}

Trending Topics