Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Markup Languages > HTML   »   HTML question

 
Thread Tools Display Modes
Question
 
 
#1  
Old Apr 8, 2003, 08:54 AM
chrisbaker4937
New Member
chrisbaker4937 is offline
 
Join Date: Apr 2003
Location: England
Posts: 14
chrisbaker4937 See this member's comment history on his/her Profile page.
Send a message via ICQ to chrisbaker4937
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 ???

Reply With Quote
 
     

Answers
 
 
Old Apr 8, 2003, 12:26 PM   #2  
Junior Member
coreybryant is offline
 
Join Date: Jan 2003
Posts: 134
coreybryant See this member's comment history on his/her Profile page.
Re: HTML question

Check out this site for some scripts & examples:
http://www.scriptsearch.com/JavaScri...Date_and_Time/

Corey
  Reply With Quote
 
     
 
 
Old Apr 9, 2003, 07:31 AM   #3  
New Member
chrisbaker4937 is offline
 
Join Date: Apr 2003
Location: England
Posts: 14
chrisbaker4937 See this member's comment history on his/her Profile page.
Send a message via ICQ to chrisbaker4937
Re: 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. :-/
  Reply With Quote
 
     
 
 
Old Apr 9, 2003, 08:07 AM   #4  
Junior Member
coreybryant is offline
 
Join Date: Jan 2003
Posts: 134
coreybryant See this member's comment history on his/her Profile page.
Re: 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
  Reply With Quote
 
     
 
 
Old Apr 10, 2003, 03:44 AM   #5  
New Member
chrisbaker4937 is offline
 
Join Date: Apr 2003
Location: England
Posts: 14
chrisbaker4937 See this member's comment history on his/her Profile page.
Send a message via ICQ to chrisbaker4937
Re: HTML question



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

Regards
  Reply With Quote
 
     


Thread Tools
Display Modes

 
Similar Sponsors

Similar Threads
Question Asker Forum Answers Last Post
Help with HTML. ittle HTML 6 Jun 26, 2006 12:02 PM
Javascript question: Can I get The html content inside a frame? xuanmanh HTML 1 Apr 3, 2006 04:00 AM
html help ! chrisbaker4937 HTML 5 Jun 28, 2004 12:26 AM
html question chrisbaker4937 HTML 3 Jun 20, 2003 05:29 AM
HTML urbisoler HTML 1 Feb 23, 2003 08:06 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 06:01 AM.