473,544 Members | 1,903 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Javascript will not display date correctly in FIREFOX, ok in EXPLORER

Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim

Jul 23 '05 #1
34 2052
<kr****@princet on.edu> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim


Change
year = now.getYear();
to
year = now.getFullYear ();
Jul 23 '05 #2
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:ob******** ************@co mcast.com...
<kr****@princet on.edu> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.
Thanks for any help,
Jim


Change
year = now.getYear();
to
year = now.getFullYear ();


getYear and getFullYear
http://www.quirksmode.org/js/datecompat.html

http://www.developersdex.com/asp/mes...2978&r=3701766
Jul 23 '05 #3
JRS: In article <11************ *********@z14g2 000cwz.googlegr oups.com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang. javascript,
kr****@princeto n.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.


Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.

Indeed, you should read relevant FAQs before writing Web pages too; the
time you thus save includes your own.

Probably you are using method getYear which AIUI in various systems
can for current dates return 5, 105, or 2005.

Method getFullYear is available in current browsers (but be careful
if you are writing for the third world or backwoods colleges). And a
programmer can construct it from getYear and getTime . But if
that is the current date, then
(a) 2000 + getYear()%100 will do for quite a while
(b) telling the reader the current date is a waste of bandwidth.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jul 23 '05 #4
Dr John Stockton wrote:
JRS: In article <11************ *********@z14g2 000cwz.googlegr oups.com>,
dated Fri, 28 Jan 2005 17:18:15, seen in news:comp.lang. javascript,
kr****@princeto n.edu posted :
Hi. I am at a loss to decipher why the javascript on my web page:

http://www.psych.nmsu.edu/~jkroger/lab/index.html

does not display the date correctly in Firefox. Instead of "2005" for
the year,
it displays "105" ... however, in IE Explorer, it looks fine.

Before posting to a newsgroup, you should read its FAQ; the FAQ for this
group is posted thrice a week, in two parts.


Really? Never seen it here. Perhaps it's sent via an email news feed?

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #5
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.ne t> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?


No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this machine.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #6
Michael Winter wrote:
On Sun, 30 Jan 2005 14:30:05 -0500, Ed Mullen <ed@edmullen.ne t> wrote:

[Auto-posted FAQ]
Really? Never seen it here. Perhaps it's sent via an email news feed?

No. It's posted just before 1200 GMT[1] every Monday, Wednesday and
Friday. It has been for as long as I've read this group.

Mike
[1] Possibly +0100 in the summer. I don't have those posts on this machine.


Nope, sorry. Been reading this group since at least early 2003 and I've
never seen a FAQ posted. Again, perhaps it is automatically sent on the
mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to 11/13/2004
and there's no FAQ among them.

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #7
Ed Mullen <ed@edmullen.ne t> wrote in
news:ct******** *@ripley.netsca pe.com:
Dr John Stockton wrote:

Before posting to a newsgroup, you should read its FAQ; the FAQ for
this group is posted thrice a week, in two parts.


Really? Never seen it here. Perhaps it's sent via an email news
feed?


This is heavily cross-posted. One of the other groups may indeed have a
weekly FAQ posted, but not here in netscape.public .mozilla.genera l

This is a classic example of why cross-posting is a bozo-no no.

Followups set to netscape.public .mozilla.genera l
--
}:-) Christopher Jahn
{:-( http://www.actorsplayhouse.org

"But we'll never survive!" "Nonsense. You're only saying that
because no one ever has." William Goldman, THE PRINCESS BRIDE
Jul 23 '05 #8
Ed Mullen wrote:
Michael Winter wrote: <snip>
No. It's posted just before 1200 GMT[1] every Monday, Wednesday
and Friday. It has been for as long as I've read this group.

<snip> Nope, sorry. Been reading this group since at least early 2003
and I've never seen a FAQ posted. Again, perhaps it is
automatically sent on the mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to
11/13/2004 and there's no FAQ among them.


The extensive list of cross-posted groups is not being observed. The FAQ
in question is the one belonging to comp.lang.javas cript (and it is
posted to the group as described).

Richard.
Jul 23 '05 #9
Richard Cornford wrote:
Ed Mullen wrote:
Michael Winter wrote:


<snip>
No. It's posted just before 1200 GMT[1] every Monday, Wednesday
and Friday. It has been for as long as I've read this group.


<snip>
Nope, sorry. Been reading this group since at least early 2003
and I've never seen a FAQ posted. Again, perhaps it is
automatical ly sent on the mailing list but I'm not seeing it on
news://news.mozilla.org:119/netscape...ozilla.general using
Mozilla Suite Mail/News. I see messages here going back to
11/13/2004 and there's no FAQ among them.

The extensive list of cross-posted groups is not being observed. The FAQ
in question is the one belonging to comp.lang.javas cript (and it is
posted to the group as described).

Richard.


Ahhh! Excellent. Thank you.

--
Ed Mullen
http://edmullen.net
http://edmullen.net/moz.html
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1661
by: Lawrence San | last post by:
I'm trying to test some simple JavaScript meant to speed up the display of my Web pages for readers using modems, but I have a fast DSL connection and I'm having trouble visualizing how effective the code is. Does anybody know of software that will simulate modem speed over a DSL connection -- i.e., temporarily slow down the speed of my...
4
44044
by: zborisau | last post by:
Hey good people, I've been given a problem to solve recently - and stuck with the solution for a good 4 days already. i have a link which leads to popup window. the purpose of that popup window is to redirect user to the one of available servers. so i need to check which server is available. i have decided to download some 1pixel image...
16
2302
by: Eric | last post by:
I have a user of a web application written in Java/JSP that is unable to login to the site simply because certain links on the page do not run when they are clicked. Other popups using Javascript on the same page work correctly. It appears to be isolated to 1-2 machines in a particular network. I cannot verify whether these machines have...
2
9011
by: joelkeepup | last post by:
Hi, I made a change this morning and now im getting an error that says either "a is undefined or null" or "e is undefined or null" the microsoft ajax line is below, I have no idea how to figure this problem out. Any suggestions? thanks Joel
1
3823
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt worked. Dates of particular year,month not displayed in that calender grids. i have collected that coding from online free resources. Here i have...
0
7431
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7370
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7779
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7714
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5920
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3424
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3415
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
674
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.