Javascript on same pages causes menu to not show

Using AWM with Fusion.
Bob Brink
Posts: 19
Joined: Fri Jun 22, 2007 8:48 am
Contact:

Javascript on same pages causes menu to not show

Postby Bob Brink » Thu Nov 26, 2009 9:16 am

Hello,

NOf 10 and Allweb Menu Pro 4.2.

Menu is in the Masterboarder, script to tell local time is in text box on the page. If I remove one the other publishes fine but I cannot publish both at same time.

Code: Select all

<!-- Clock Part 1 - Holder for Display of Clock --> <p style="margin-bottom: 0px;"><span style="font-size: 12px; color: rgb(0,0,255);">Currently in our office it is </span> <font color="#0000FF" size = "3"><span id="tP">&nbsp;</span></font> </p> <!-- Clock Part 1 - Ends Here --> <!-- Clock Part 2 - Put Anywhere AFTER Part 1 --> <script type="text/javascript"> // Clock Script Generated By Maxx Blade's Clock v2.0d // http://www.maxxblade.co.uk/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 dT(){ document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); } function aP(x){ return (x>11)?'pm':'am'; } function y4(x){ return (x<500)?x+1900:x; } var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),oT="dN[tS().getDay()]+' '+(tS().getMonth()+1)+'/'+tS().getDate()+'/'+y4(tS().getYear())+' '+'a'+'t'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+aP(tS().getHours())"; if(!document.all){ window.onload=dT; }else{ dT(); } </script> <!-- Clock Part 2 - Ends Here -->
I am open to changing the time script, using different type of code, -just about anything...

Any help would be greatly appreciated.

Bob

User avatar
admin
Site Admin
Posts: 1303
Joined: Mon Oct 24, 2005 2:07 am
Location: Stuart, FL
Contact:

Re: Javascript on same pages causes menu to not show

Postby admin » Sat Nov 28, 2009 2:51 pm

Hello,

NOf 10 and Allweb Menu Pro 4.2.

Menu is in the Masterboarder, script to tell local time is in text box on the page. If I remove one the other publishes fine but I cannot publish both at same time.

Code: Select all

<!-- Clock Part 1 - Holder for Display of Clock --> <p style="margin-bottom: 0px;"><span style="font-size: 12px; color: rgb(0,0,255);">Currently in our office it is </span> <font color="#0000FF" size = "3"><span id="tP">&nbsp;</span></font> </p> <!-- Clock Part 1 - Ends Here --> <!-- Clock Part 2 - Put Anywhere AFTER Part 1 --> <script type="text/javascript"> // Clock Script Generated By Maxx Blade's Clock v2.0d // http://www.maxxblade.co.uk/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 dT(){ document.getElementById('tP').innerHTML=eval(oT); setTimeout('dT()',1000); } function aP(x){ return (x>11)?'pm':'am'; } function y4(x){ return (x<500)?x+1900:x; } var dN=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),oT="dN[tS().getDay()]+' '+(tS().getMonth()+1)+'/'+tS().getDate()+'/'+y4(tS().getYear())+' '+'a'+'t'+' '+tH(tS().getHours())+':'+lZ(tS().getMinutes())+':'+lZ(tS().getSeconds())+aP(tS().getHours())"; if(!document.all){ window.onload=dT; }else{ dT(); } </script> <!-- Clock Part 2 - Ends Here -->
I am open to changing the time script, using different type of code, -just about anything...

Any help would be greatly appreciated.

Bob
Use this code instead of yours.

There's a conflict with your current code and one of the awmlib files.

I added a '9' after each function name to eliminate the conflict. (without spending the time to determine precisely which function causes the naming conflict)

Code: Select all

<!-- Clock Part 1 - Holder for Display of Clock --> <p style="margin-bottom: 0px;"><span style="font-size: 12px; color: rgb(0,0,255);">Currently in our office it is </span> <font color="#0000FF" size = "3"><span id="tP">&nbsp;</span></font> </p> <!-- Clock Part 1 - Ends Here --> <!-- Clock Part 2 - Put Anywhere AFTER Part 1 --> <script type="text/javascript"> // Clock Script Generated By Maxx Blade's Clock v2.0d // http://www.maxxblade.co.uk/clock function tS9(){ x=new Date(); x.setTime(x.getTime()); return x; } function lZ9(x){ return (x>9)?x:'0'+x; } function tH9(x){ if(x==0){ x=12; } return (x>12)?x-=12:x; } function dT9(){ document.getElementById('tP').innerHTML=eval(oT9); setTimeout('dT9()',1000); } function aP9(x){ return (x>11)?'pm':'am'; } function y49(x){ return (x<500)?x+1900:x; } var dN9=new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat'),oT9="dN9[tS9().getDay()]+' '+(tS9().getMonth()+1)+'/'+tS9().getDate()+'/'+y49(tS9().getYear())+' '+'a'+'t'+' '+tH9(tS9().getHours())+':'+lZ9(tS9().getMinutes())+':'+lZ9(tS9().getSeconds())+aP9(tS9().getHours())"; if(!document.all){ window.onload=dT9; }else{ dT9(); } </script> <!-- Clock Part 2 - Ends Here -->
Admin Chuck

PS - You really should upgrade to AWM 5. Much more powerful than 4.2. You can download the demo (and buy the program) from our Store page here on Beyond Fusion. And Fusion 11 is currently on sale. A great time to upgrade from 10.


Return to “AllWebMenus from Likno”

Who is online

Users browsing this forum: No registered users and 1 guest

cron