Ask Experts Questions for FREE Help !
Ask
    chrisbaker4937's Avatar
    chrisbaker4937 Posts: 14, Reputation: 1
    New Member
     
    #1

    Apr 8, 2003, 08:54 AM
    HTML question
    Hello,

    I would like my website to display the date automatically (without me having to update the page each day) , can anyone let me have HTML to do this ?

    I can understand that putting the time on the page could be more complicated allowing for time zones but hopefully the date is a bit easier.

    Thanks ?
    coreybryant's Avatar
    coreybryant Posts: 134, Reputation: 2
    Junior Member
     
    #2

    Apr 8, 2003, 12:26 PM
    HTML question
    Check out this site for some scripts & examples:
    http://www.scriptsearch.com/JavaScri...Date_and_Time/

    Corey
    chrisbaker4937's Avatar
    chrisbaker4937 Posts: 14, Reputation: 1
    New Member
     
    #3

    Apr 9, 2003, 07:31 AM
    HTML question
    Thanks for the info - I checked the site and a couple of the links are no longer valid and the other one had loads of html that I could not get to work...

    Any other help would be gratefully received. :-/
    coreybryant's Avatar
    coreybryant Posts: 134, Reputation: 2
    Junior Member
     
    #4

    Apr 9, 2003, 08:07 AM
    HTML question
    Afte looking at it again, this is what I came up with - only for the date. Place this somewhere before the </head>:
    <script language="JavaScript">
    <!--

    //Get Date
    Var months=new Array(13);
    Months[1]="January";
    Months[2]="February";
    Months[3]="March";
    Months[4]="April";
    Months[5]="May";
    Months[6]="June";
    Months[7]="July";
    Months[8]="August";
    Months[9]="September";
    Months[10]="October";
    Months[11]="November";
    Months[12]="December";
    Var time=new Date();
    Var lmonth=months[time.getMonth() + 1];
    Var date=time.getDate();
    Var year=time.getYear();
    If (year < 2000)
    Year = year + 1900;


    //-->
    </script>

    And then place this script wherever you want the date to appear:
    <script language="javascript">
    Document.write(lmonth + " " + date + ", " + year);
    </script>

    Corey
    chrisbaker4937's Avatar
    chrisbaker4937 Posts: 14, Reputation: 1
    New Member
     
    #5

    Apr 10, 2003, 03:44 AM
    HTML question
    ;)

    Thanks for your help - all OK now and used on my site.

    Regards

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Help with HTML. [ 6 Answers ]

okay. So I have my webpage at index.htm and I start building the structure. <html><head><title>my homepage of ittle</title></head> <body> <center><b><u><h1><font color=red> WELCOME! <br size=5 color=pink> now I have a matrix animation using javascript. Then I have a button that says home so...

Javascript question: Can I get The html content inside a frame? [ 1 Answers ]

Is it possible to get all html code of the page inside a frame with the frame name for example: <iframe src='file.php' name=framename id=framename></iframe> Then how do I get the html content of 'file.php'?

Html help ! [ 5 Answers ]

?? I have a website for my in laws villa in Florida which I will shortly be updating, I have seen whilst browsing the net another site: - www.users.waitrose.com/~elainenicol When you click on 'the cottage' you are presented with a floor plan, by clicking on the room you then move to the...

Html question [ 3 Answers ]

I am planning to update the look of my site and especially want to update the background (this was created as part of a trellix wizard).  Are there any sites that I could visit that assist me ?   I also have a couple of pictures that I may wish to use as the background - I know you can write...

Html [ 1 Answers ]

Howdy I have some files, all of which are .jpg I have FTP them to an AOL web server. Questions: What extension do they now have? If not HTML, how do they get to be HTML which is What I am wanting? And, yes, I am new at this.


View more questions Search