Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Javascript time/date stamp

    I am having some problems putting the getDate() function in a static variable so that the time/date will not refresh every time the page is loaded.

    What I am trying to do is to put a date/time stamp for every news post I have on my site, obviously I don't want them to change every time someone loads the page.

    any ideas?

    Thanks

  • #2
    Regular Coder
    Join Date
    Jan 2003
    Posts
    867
    Thanks
    4
    Thanked 8 Times in 8 Posts
    getDate() will look up the current date and time. Are you using some sort of serverside language like PHP, ASP, or perl for your news posting? Create the date with one of those, the database, or even with javascript, then submit it along with your news posting. Dynamically generating it every time someone comes to the page won't work.

  • #3
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, I am not using any SS program to post news...I guess I need to.

    [off to learn CGI, PHP]


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •