Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Canton, Ohio, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Displaying server time in HTML (FP 2000)

    Is there anyway I can display the server time on a webpage written in HTML. I know how to do it in ASP but my page doesn't seem to work when saved as an ASP.
    If possible, I'd like it to be a running clock, not a static time when the browser was opened.

  2. #2
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Displaying server time in HTML (FP 2000)

    If it was a running clock - it would have to make repeated calls back to the server.

    Why not a javascript, using the users' system clock?
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  3. #3
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Canton, Ohio, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying server time in HTML (FP 2000)

    The problem is that the forms are sorted by time when they are received by management by email. (The email has the server time stamp on it) Since employees can fill out this form from home or at any workstation with Internet access, they need to know the time their form will have on it. That is why we need one clock for all to see, server clock.

  4. #4
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Displaying server time in HTML (FP 2000)

    "my page doesn't seem to work when saved as an ASP."
    This is probably something you've already considered. But where are you saving your page to and does it have an ASP server?
    I believe in getting the obvious out of the way first <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  5. #5
    2 Star Lounger
    Join Date
    Mar 2003
    Location
    Canton, Ohio, USA
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Displaying server time in HTML (FP 2000)

    The site is written all in ASP. I just couldn't get the ASPEmail to work, so, I decided to brake down and use FrontPage extensions to send the form results to email addresses. If the form is saved as an ASP page, the email sends won't work. But if I save it as an html page, the email works but I can't display the server time.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Displaying server time in HTML (FP 2000)

    As you've noticed, HTML is not dynamically generated. But perhaps you can use ASP to create a hidden date/time field i your form so that when you have FP forward the information, it has that field in it.

    <span style="background-color: #FFFF00; color: #000000; font-weight: bold"> Oops, correction!!! </span hi>

    Oh, it's not an ASP page. Well, there is a secret! You can use a JavaScript source include to pull an ASP file. Calculate the date and time in your ASP file and assign it to a variable in a JavaScript friendly format. Basically, your Response object consists of one line of JavaScript. Pull this in your HTML page and then use some additional script to insert it to the appropriate place. For some guidance, see <post#=129006>post 129006</post#>.

    Now... you want it to match the time of submission. I'm not sure how you can do this, but as you know, there is a high degree of interest now in AJAX, a technology for using scripts to retrieve data from the server without having to submit the page. In theory you could use AJAX to retrieve an ASP page with the current time (as in the above scenario) and write that into the document, but this might be way too complex to implement if you have no other use for AJAX and no experience with it.

Posting Permissions

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