dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Server Time

  1. #1
    Join Date
    Jan 2004
    Location
    Leeds, UK
    Posts
    68

    Server Time

    I want to grab the server time and display this on my html page.

    I found this in the java forum:-

    var serverDate = '<!--#echo var="DATE_LOCAL" -->';

    but dont know how to use it.

    I want a user to log on to my site, then the site tells them the time at which the page loaded, (in server time).

    Any idea's?

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Javascript is a client-side language thus it can not keep alone a dialog with server.

    var serverDate = '<!--#echo var="DATE_LOCAL" -->';

    means that another application, a server-side one (PHP, as it looks at first glance) was involved

  3. #3
    Join Date
    Aug 2003
    Location
    Seattle
    Posts
    150
    Try this:

    <html>
    <body>
    <!--#echo var="DATE_LOCAL" -->
    </body>
    </html>

    That is a server include & instead of naming file sometrhing.html name it something.shtml.

    Bob

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles