HighDots Forums  

Java Script help with copyright and last updated dates

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Java Script help with copyright and last updated dates in the Macromedia Dreamweaver forum.



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

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 01:52 PM






That's what this js is supposed to do, but I can see it's not working in FF.

--
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
==================

"darrel" <notreal (AT) hotmail (DOT) com> wrote

Quote:
I think what Murray was fazed by is the notion that you have to update
copyright notices "once a year." The copyright year is the year in which
the work was created. If that was 1999, the the copyright will be 1999,
no matter what the year is now. So updating copyright notices to the
current year is pointless and may actually invalidate them.

Typically, one simply puts a blanket copyright on the contents of a web
site:

Web site copyrighted 1998-2005

etc...

-Darrel





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

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 02:02 PM






Quote:
That's what this js is supposed to do
Oh, right. I'm just saying that if it was an SSI, that'd be fairly trivial
to update.

-DArrel




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

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 02:05 PM



If the proper neurons fire, of course.

--
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
==================

"darrel" <notreal (AT) hotmail (DOT) com> wrote

Quote:
That's what this js is supposed to do

Oh, right. I'm just saying that if it was an SSI, that'd be fairly trivial
to update.

-DArrel





Reply With Quote
  #14  
Old   
Gary White
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 02:47 PM



darrel wrote:

Quote:
Oh, right. I'm just saying that if it was an SSI, that'd be fairly trivial
to update.

If you use Apache and SSI, there would be no need to update it at all:

<!--#config timefmt="%Y" -->
Copyright 1911 - <!--#echo var="DATE_LOCAL" -->


Gary


Reply With Quote
  #15  
Old   
CrimeDoctor
 
Posts: n/a

Default Re: Java Script help with copyright and last updateddates - 05-16-2005 , 04:11 PM



Originally posted by: Newsgroup User
I'd suggest not using javascript for the copyright date, since that only
needs updating once a year, a SSI might make more sense.

Also, the javascript 'last updated' is pointless, since it doesn't have
anything to do with when the page was actually last updated, so I'd just get
rid of that.

-Darrel




Best simple advice I heard all day...I don't need no stinkin JavaScript dates.
I can easily update the copyright date once per year because it is included in
the template.

I deleted the JavaScript. Thanks for the help...simple is usually best.



Reply With Quote
  #16  
Old   
Travis
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 04:34 PM



Dreamweaver can update the date everytime you save your page. Is this
what you want?

Travis
***************************************
http://www.w3schools.com - Online Web Tutorials
http://www.projectseven.com - Dreamweaver Extensions & CSS Tutorials
http://www.webblobber.com - Free Templates, Javascript, Fonts & More.
***************************************

CrimeDoctor wrote:
Quote:
My website http://www.crimedoctor.com has Java Scripts at the very bottom of
the page for updating the copyright year and page last updated date. It
displays the year perfectly in IE 6.0 as ?5/16/2005?

However, in Netscape and Firefox the Java Script displays the year as
?5/16/105?

Can anyone advise me how to fix this code?I can?t see the error?

Here is the Java Script code:

script type="text/javascript"></script
script type="text/javascript">function todayStr() {
var today=new Date()
return today.getMonth()+"/"+today.getDate()+"/"+(today.getYear())
}
function yearStr() {
var today=new Date()
return today.getYear()
}
/script
Copyright &copy; 1996-
script type="text/javascript">document.write(yearStr())</script
- Aegis Books, Inc. - All Rights Reserved - <br
Page Last Updated -
script type="text/javascript">document.write(todayStr())</script



Reply With Quote
  #17  
Old   
Mick White
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-16-2005 , 04:45 PM



CrimeDoctor wrote:

Quote:
My website http://www.crimedoctor.com has Java Scripts at the very bottom of
the page for updating the copyright year and page last updated date. It
displays the year perfectly in IE 6.0 as ?5/16/2005?

However, in Netscape and Firefox the Java Script displays the year as
?5/16/105?

Can anyone advise me how to fix this code?I can?t see the error?
<p id="foo" style="display:hidden">
Copyright &copy; 1996-
<script type="text/javascript">
document.write(new Date().getFullYear())
</script>
- Aegis Books, Inc. - All Rights Reserved - <br>
Page Last Updated -
<script type="text/javascript">
document.write(document.lastModified || "recently")
</script>
</p>
<script type="text/javascript">
document.getElementById("foo").style.display="";
</script>


Mick


Reply With Quote
  #18  
Old   
Gary White
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-17-2005 , 12:59 AM



Mick White wrote:

Quote:
p id="foo" style="display:hidden"
<p id="foo" style="display:none">


Gary


Reply With Quote
  #19  
Old   
Mick White
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-17-2005 , 08:24 AM



Gary White wrote:

Quote:
Mick White wrote:


p id="foo" style="display:hidden"


p id="foo" style="display:none"


Gary
Yep.
Thanks, Gary.
Mick


Reply With Quote
  #20  
Old   
Gary White
 
Posts: n/a

Default Re: Java Script help with copyright and last updated dates - 05-17-2005 , 09:50 AM



Mick White wrote:

Quote:
Yep.
Thanks, Gary.

NP, Mick.


Gary


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.