HighDots Forums  

Re: "insert date" command problem

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: "insert date" command problem in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: "insert date" command problem - 11-01-2004 , 03:18 PM






Quote:
I've checked the boxs that is suppoesd to refresh the page each
time it's loaded to display to show the current date.
Then you didn't read the instructions carefully. The date is only updated
each time that page is SAVED. It is not automatically updated each day.

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

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

Quote:
I'm using the dwmx2004 insert date command object to display the day and
date
on each page. I've checked the boxs that is suppoesd to refresh the page
each
time it's loaded to display to show the current date.

The code on the page looks like this:

!-- #BeginDate format:fcAm1 -->Friday, October 29, 2004<!-- #EndDate --


My problem is that it is only displaying the date that the page was loaded
onto the server and I cannot get it to change to the current date. It's
currently on a linux server (getting moved to a windows server). Is this
the
problem or is there another problem that I need to resolve- with code or
something else? Do I ened to code this another way to ge tthe current day
and
time to show?

Any help would be appreciated.

Thanks!





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

Default Re: "insert date" command problem - 11-01-2004 , 03:51 PM






So then that's basically there only as a last modified button (ok, pretty
useless) Code would've been better written for current day/date.
So, is there a way to display the current day/date on each page (hoping that
the host server has the correct day and date)? These aren't asp pages, just
html. Is there a way to get that information to display? (a non-programmer asks)




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

Default Re: "insert date" command problem - 11-01-2004 , 03:52 PM



Sure.

You put this in the head -

<script language="JavaScript" type="text/javascript">
function getTheDate() {
var now = new Date();
d
=["Jan.","Feb.","Mar.","Apr.","May","June","July","A ug.","Sept.","Oct.","Nov.","Dec."][now.getMonth()]+"
";
d+=now.getDate()+", "+now.getFullYear();
return d;
}
</script>

and then this on the page -

<script language="JavaScript"
type="text/javascript">document.write(getTheDate());</script>

wherever you want the date to appear.

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

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

Quote:
So then that's basically there only as a last modified button (ok, pretty
useless) Code would've been better written for current day/date.
So, is there a way to display the current day/date on each page (hoping
that
the host server has the correct day and date)? These aren't asp pages,
just
html. Is there a way to get that information to display? (a non-programmer
asks)






Reply With Quote
  #4  
Old   
sharC1120KC
 
Posts: n/a

Default Re: "insert date" command problem - 11-01-2004 , 04:55 PM



Thanks, I'll give it a try tonight.

Reply With Quote
  #5  
Old   
James Shook
 
Posts: n/a

Default Re: "insert date" command problem - 11-01-2004 , 06:07 PM



sharC1120KC wrote:
Quote:
Thanks, I'll give it a try tonight.
By the way, these date scripts get the date from the local system, not
the server. I think you would need a language other than JavaScript to
get the server time. But you probably don't want that anyway.

I have to say it: I think that page elements that inform the viewer of
the date and time are a waste of page area and code. No one goes to a
web site just to see what the date is, and most of the systems that I
have seen have this information readily available from the menubar,
desktop, start bar or whatever apparatus the OS puts on the screen by
default.

--
James M. Shook
http://www.jshook.com


Reply With Quote
  #6  
Old   
Wizard of Draws
 
Posts: n/a

Default Re: "insert date" command problem - 11-01-2004 , 08:33 PM



On 11/1/04 6:07 PM, in article cm6fjq$3g2$1 (AT) forums (DOT) macromedia.com, "James
Shook" <jshook (AT) dont_mail (DOT) com> wrote:

Quote:
I have to say it: I think that page elements that inform the viewer of
the date and time are a waste of page area and code. No one goes to a
web site just to see what the date is, and most of the systems that I
have seen have this information readily available from the menubar,
desktop, start bar or whatever apparatus the OS puts on the screen by
default.
I've had people ask to be notified when I add toons to my site, but I don't
care to maintain a mailing list. A 'last updated date' placed on my index
page might be a quick and simple way for them to check.
--
Jeff 'The Wizard of Draws' Bucchino
Cartoons with a Touch of Magic
http://www.wizardofdraws.com
http://www.cartoonclipart.com



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.