HighDots Forums  

How to use a dynamic date?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss How to use a dynamic date? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Amartyr1 webforumsuser@macromedia.com
 
Posts: n/a

Default How to use a dynamic date? - 07-09-2003 , 03:05 PM






I want to put a date on a html page. I used the ?Insert/Date? command. It inserted the date alright. But the problem is, it does not update. I tested on a server, it show the same date even the next day. How can I put a date that actually changes (each minute, each day)?

Thank you

Angel




Reply With Quote
  #2  
Old   
darrel
 
Posts: n/a

Default Re: How to use a dynamic date? - 07-09-2003 , 03:18 PM






Quote:
I want to put a date on a html page. I used the ?Insert/Date? command.
What scripting language are you using?

BTW, what's the point of putting the current date/time on a web page?
Everyone already has that on their computer/watch/wall.

-Darrel




Reply With Quote
  #3  
Old   
FER
 
Posts: n/a

Default Re: How to use a dynamic date? - 07-09-2003 , 03:21 PM



hey , if you want to use JavaScript

here is the code:
paste it, in the place where you want show the date


<script language="JavaScript">
<!--
var MyDate = new Date()
MyDayWeek = (MyDate.getDay())
MyMonth = (MyDate.getMonth())
MyDay = (MyDate.getDate())
MyYear = "2000"
DayWord = new Array("SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY",
"FRIDAY", "SATURDAY", 7)
MonthWord = new Array("January", "February", "March", "April", "May",
"June", "July", "August", "September", "October", "November", "December",
12);
document.write(""+(DayWord [MyDayWeek])+""+" "+(MonthWord [MyMonth])+"
"+MyDay+", "+MyYear);
//-->
</script>


cheers

FER





"Amartyr1" <webforumsuser (AT) macromedia (DOT) com> escribió en el mensaje
news:behp2d$jn4$1 (AT) forums (DOT) macromedia.com...
Quote:
I want to put a date on a html page. I used the ?Insert/Date? command.
It inserted the date alright. But the problem is, it does not update. I
tested on a server, it show the same date even the next day. How can I put
a date that actually changes (each minute, each day)?
Quote:
Thank you

Angel






Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: How to use a dynamic date? - 07-09-2003 , 04:33 PM



Amartyr:

If you read the help information about that function, you'll discover that
it only updates when the file is changed. It's not a dynamic date....

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.DreamweaverFAQ.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"Amartyr1" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
I want to put a date on a html page. I used the ?Insert/Date? command.
It inserted the date alright. But the problem is, it does not update. I
tested on a server, it show the same date even the next day. How can I put
a date that actually changes (each minute, each day)?
Quote:
Thank you

Angel






Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.