Click to See Complete Forum and Search --> : basic clock script compatibility with netscape?


bcsd
11-21-2002, 10:38 AM
I am using the basic clock javascript code provided from the clock section on the javascript section of this site and it is apparently incompatible with netscape. it works fine in ie, but the times just don't appear in netscape. if anyone has any comments directly related to that script, i would greatly appreciate it. otherwise, i'd like any advice you may have on netscape compatiblity. thanks!

gil davis
11-21-2002, 03:27 PM
You need to be more specific. Post a link to the script you are asking about.

You cannot expect someone to hunt for a script that *might* be the one you are asking about.

SSC Fahd
11-25-2002, 03:31 PM
I believe he/she is referring to this clock:

http://javascript.internet.com/clocks/universal-clock.html

Actually I have the same problem (sort of). I messed around with a script that was based on that one, and yet I still can't figure out what makes it IE only. All the defined variables (like getUTChours) should work with non-IE browsers... so anyone else have any ideas...?

Here's the script I was messing with:

HTML File: http://www.btinternet.com/~fs2/temp/timezone.htm
Java-script File (.txt): http://www.btinternet.com/~fs2/temp/timezone.txt

I'm quite new to Java-script (I mostly mess around with Perl) so it's probably something obvious

gil davis
11-25-2002, 06:04 PM
I can tell you that it won't work with NS 6+ or Mozilla. It is only set up to work on NS 4 (document.layers) and IE (document.all). To make it work on NS 6, change the browser detection and then use

document.getElementById("clockLocal").innerHTML

and

document.getElementById("clockUTC").innerHTML

to change the data in the clock.

Also, in the SPAN tag, put quotes around the ID:

... id="..." ...