There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
blue screen boot computer connection cpu crash css dell display driver drivers email error ethernet excel firefox firefox 3 game hard drive hardware internet internet explorer itunes laptop lcd malware monitor network networking outlook outlook 2003 outlook express partition password printer problem problems router security slow software sound trojan usb video virus vista windows windows xp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
Solved: Date Display in IE vs FireFox


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
snorkytheweasel's Avatar
Computer Specs
Senior Member with 143 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/Windows:Fossil
09-Oct-2007, 02:49 PM #1
Solved: Date Display in IE vs FireFox
The code:

<script language="JavaScript" type="text/javascript">
document.write("© OHSD 2002-" + cDate.getYear());
</script>


In IE it displays correctly:

© OHSD 2002-2007

In FireFox, it displays in a bizarre fashion:

© OHSD 2002-107

It is bad code, or is it a FireFox bug?

In either case, is there a fix or a work-around?
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,724 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
09-Oct-2007, 03:29 PM #2
That's a known issue in Firefox. There's a bug report written on this that's pretty old and I don't think it's going to be changed. You can get some useful info on this here and here.

Peace...
snorkytheweasel's Avatar
Computer Specs
Senior Member with 143 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/Windows:Fossil
09-Oct-2007, 04:14 PM #3
Thanks.

I was using the wrong function. instead of getYear(), I should have used getFullYear().

There is a small degree of comfort in knowing that it is FireFox anomaly
snorkytheweasel's Avatar
Computer Specs
Senior Member with 143 posts.
 
Join Date: May 2006
Experience: UNIX/VMS:Elder Geek; DOS/Windows:Fossil
09-Oct-2007, 04:18 PM #4
Solved! Date Display in FireFox
The survey sez:

The correct function is getFullYear(), rather than getYear()
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:01 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.