I've had issues with getYear() after creating a js date before in FireFox. It would display 2005 in IE, but in FF it displays 105. I had to use getFullYear() for it to display correctly. I don't have time to look into the getMinutes and getSeconds, etc, but I would be willing to bet a cold brewski that might have something to do with it.
Ray At 02:43 PM 4/5/2005, you wrote: >I have a clock javascript that works fine in IE 6.0, but does not >display correctly in Firefox 1.0.2 or Netscape 7.0. Can anyone tell me >what's up here? I've tried googling for tips, but didn't come up with >anything. Here is the script: > >In the head section: ><script type="text/javascript"> >function clock() { >var time = new Date(); >var hours = time.getHours(); >var minutes = time.getMinutes(); >var seconds = time.getSeconds(); >var amOrPm = "AM"; >if (hours > 11) amOrPm = "PM"; >if (hours > 12) hours = hours - 12; >if (hours == 0) hours = 12; >if (minutes <= 9) minutes = "0" + minutes; >if (seconds <= 9) seconds = "0" + seconds; >dispTime = hours + ":" + minutes + ":" + seconds + " " + amOrPm; >document.getElementById('clock').innerHTML = dispTime; >setTimeout("clock()", 1000); >} >window.onload = Clock; ></script> > >Inside the body: ><div id="clock" style="position:absolute;left:100;top:100;"></div> > >In Firefox, it displays the time 8 hours ahead, but in IE it shows the >correct system time. > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:201567 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54