Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Closed Thread
 
Thread Tools Display Modes
Share |
  #1  
Old 09-13-2015, 07:42 PM
terrano terrano is offline
Junior Member
 
Join Date: 02-11-10
Posts: 45
iTrader: 0 / 0%
Clock Script does not Display in Firefox

The below script works on all browsers except the latest version of Firefox.

I tried .text()=eval(oT); at .innerHTML=eval(oT);

and other ideas @ http://stackoverflow.com/questions/2...ing-in-firefox

Still does not work, note even the clock script on W3schools.com
does not display in Firefox.

Read clock can be set up with Jquery file is this a better way togo ?

Or does somebody know please how to get the posted code to display the
clock in Firefox ?



Code:
<!-- Clock Part 1 - Put Anywhere Before Part 2 --> <script language="JavaScript"> // Anytime Anywhere Web Page Clock Generator // Clock Script Generated at // http://www.rainbow.arch.scriptmania.com/tools/clock function tS(){ x=new Date(); x.setTime(x.getTime()); return x; } function lZ(x){ return (x>9)?x:'0'+x; } function tH(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } function y2(x){ x=(x<500)?x+1900:x; return String(x).substring(2,4) } function dT(){ if(fr==0){ fr=1; document.write('<font size=2 face=Arial><b><span id="tP">'+eval(oT)+'</span></b></font>'); } document.getElementById('tP').text()=eval(oT); setTimeout('dT()',1000); } function aP(x){ return (x>11)?'pm':'am'; } var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),mN=new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'),fr=0,oT="dN[tS().getDay()]+' '+tS().getDate()+' '+mN[tS().getMonth()]+' '+y2(tS().getYear())+' '+':'+':'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+' '+aP(tS().getHours())"; </script> <!-- Clock Part 1 - Ends Here --> <!-- Clock Part 2 - This Starts/Displays Your Clock --> <script language="JavaScript">dT();</script> <!-- Clock Part 2 - Ends Here -->
 

Advertisement

Advertisement

  #2  
Old 09-13-2015, 08:32 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,707
iTrader: 5 / 100%
What happens when you change the opening script tag to:
Code:
<script type="text/javascript">
 
  #3  
Old 09-13-2015, 08:45 PM
terrano terrano is offline
Junior Member
 
Join Date: 02-11-10
Posts: 45
iTrader: 0 / 0%
It unfortunately kills the script and will not display on any browsers.
 
  #4  
Old 09-13-2015, 08:53 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,707
iTrader: 5 / 100%
It works both ways for me in FF 40.0.3

And in IE 11.
 
  #5  
Old 09-13-2015, 10:01 PM
terrano terrano is offline
Junior Member
 
Join Date: 02-11-10
Posts: 45
iTrader: 0 / 0%
Thank you very much for testing that.

I just downloaded latest Firefox version 40:3 to another laptop
and the clock is showing on it.

On my main laptop with the Firefox the fault was on, the other day I deleted
an older version of Firefox and installed the latest version but the clock would still not display. This time round on the other laptop I cancelled updating add-ons so maybe it was something to do with an add-on update.


Cheers again
 
  #6  
Old 09-13-2015, 10:03 PM
HTMLBasicTutor's Avatar
HTMLBasicTutor HTMLBasicTutor is offline
Administrator
 
Join Date: 10-29-07
Location: Canada
Posts: 26,707
iTrader: 5 / 100%
Maybe you had some kind of script blocking set up previously?
 
  #7  
Old 09-14-2015, 03:32 PM
terrano terrano is offline
Junior Member
 
Join Date: 02-11-10
Posts: 45
iTrader: 0 / 0%
Yes good point thanks.

Mental note - in future have browsers with no add on's
for testing.

Have a great week - cheers
 
Go Back   Webmaster Forum > Web Development > Coding Forum

Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting website clock script terrano Coding Forum 5 02-11-2010 09:21 PM
Firefox Display Problem aleo1203 Coding Forum 3 10-11-2009 07:29 AM
Tabs dont display corectly in firefox - work fine in IE WorldwideTrading Coding Forum 3 11-19-2008 07:42 AM
Looking for a script to display RSS feeds on my website! NameJunky Web Design Lobby 2 07-29-2008 09:07 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:08 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC