View Full Version : Javascript Error

10-20-2005, 05:25 PM
this is probably a simple solution, but i am a designer not a programmer, so its easy for me to make mistakes. this script works great in IE , but in firefox and netscape, it opens a blank page with only the script on it. i have this script repeated throughout the page multiple times, drawing from different files, but it is the 1st one that appears. what am i missing from the tag?

<td width="49%" height="4" align="center" valign="middle" bgcolor="#F7F7F7">
<div align="center">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif" color="#777777">
<script type="text/javascript" src="times/newzealand.js"></script>

it is a simple script that simply displays the time in different time zones, but like i said, it freaks out on me in netscape and mozilla. can someone tell me what im doing wrong? thanks :)

10-20-2005, 05:45 PM
can you post a link to the page then it'll be a lot easier to help

10-20-2005, 05:51 PM


10-20-2005, 07:48 PM
the problem is that in all of your scripts you got

if(!document.all){ window.onload=dT; }else{ dT(); }
which should be:

if(!document.all){ window.onload=dT(); }else{ dT(); }

Beside that.
You only need 1 script for all of the Timezones.
So I have modified your script and page:

Timezone.js (http://www.lerura.dk/CF/TimeZone.js)
aboutus_ouroffices_cont.html (http://www.lerura.dk/CF/aboutus_ouroffices_cont.html)

10-20-2005, 10:40 PM
wow. thats really awesome of you to do that. thanks a million. it works great. i hope you didnt spend too much time on that! that is really awesome :) :) !

10-20-2005, 11:09 PM
the modification didn't take long.
The worst part was ,since it is such a large table, to find out in what files to look for the timezonedifferences and then retrieve them

but what, I have the time.