If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: N00b Question.

  1. #1
    Junior Member
    Join Date
    Oct 2005
    Member #
    If you go to me and my partners website, in the title bar we have a little "greeting" based off of the time.

    The problem is, it's based off of the servers time, that being GMT -5 if my math is correct.

    How would one go about "fetching" the website visitors time and using it for the variable?

    Thanks in advance for help.


  3. #2
    Senior Member
    Join Date
    May 2003
    Member #
    You can use JavaScript, which is what is done in

    They then store it as a session variable.

  4. #3
    Senior Member seanmiller's Avatar
    Join Date
    Sep 2003
    Glastonbury, UK
    Member #
    1 times
    I don't see this greeting. I assume it is meant to be a "good morning" or similar?

    As suggested earlier, Javascript is really the only way you're going to get hold of the visitor's time as anything server-side will not have access to that information.

    Something like this will suffice...

    <script language="javascript">
    var now = new Date();
    var hour = now.getHours();
    var period;
    if ( hour < 12 ) period = "morning";
    else if ( hour >= 12 && hour < 17 ) period = "afternoon";
    else period = "evening";
    document.write("Good " + period + " !");
    Just out of curiousity, what does "Copyright pending" mean?


    ps. not quite sure about your navigation. Whilst rotating things might seem "fun" as a challenge, I'm not sure that it really helps your visitor much. Think also about disability access.... how will those folks get to your content?

  5. #4
    Junior Member
    Join Date
    Oct 2005
    Member #
    The greeting is up in the title bar. Where "Web Design" would be on this page.

    Copyright pending means we sent in the money and application, but we're waiting for a response/certificate.

    We understand the nav problems. That was a little experiment that didnt work out well. We're changing it to rollover's later today.

    Thanks for the help.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 12:13 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: