I'm not experienced in java and so I find scripts that people post and alter them to my needs, I have a bunch of scripts that I got from the net, I want to have all on one page, problem is that I cant get them to all run at once, they must clash or something, perhaps more than one is using the same request at the same time, I need to have them 'all' work. individually on different pages they work, just not all on the same page.
I'm not really sure how combining multiple scripts together would work. When I tried I just copied and pasted them all together one after the other, but perhaps I'm doing that wrong. Its too difficult for me, my knowledge does not go that far and its too advanced for me.
If someone could help me It would really be fantastic, Ive been learning how to integrate javascript into my projects and it really is a joy when you manage to get them to work for your needs. It kind of makes me envious of those that know what they are doing, rather than my fumbles in the dark and little bouts of joy when I hit the right spot.
<script language="javascript">
var ns4=(document.layers)?true:false;
var ie4=(document.all && !document.getElementById)?true:false;
var now=new Date();
now.hrs='00';
now.min='00';
now.sec='00';
var dclk;
function setclock(){
now=new Date(); now.hrs=now.getHours(); now.min=now.getMinutes(); now.sec=now.getSeconds();
now.hrs=((now.hrs>12)? now.hrs-12 : now.hrs)+"";
now.hrs=((now.hrs<10)? "0" : "")+now.hrs;
now.min=((now.min<10)? "0" : "")+now.min;
now.sec=((now.sec<10)? "0" : "")+now.sec;
if(ns4){
dclk.document.open();
dclk.document.write('<div style="position:absolute; left:0px; top:0px; font-size:80px; color:white;"><center>'+now.hrs+':'+now.min+':'+now.sec+'</center></div>');
dclk.document.close();
}else dclk.innerHTML=now.hrs+':'+now.min+':'+now.sec;
}
window.onload=function(){
setInterval('setclock()',300);
dclk=(ns4)?document.layers['dclk']:(ie4)?document.all['dclk']:document.getElementById('dclk');
}
window.onresize=function(){
if(ns4)setTimeout('history.go(0)',400);
}
</script>
<table border="0" width="480" height="35"><tr><td align="center">
<div id="dclk" style="position:relative; font-size:20px; font-family:Digital Readout ExpUpright; color:#FFFFFF;"></div>
</td></tr></table>
<font style="font-family: DicotMedium;".
<script language="javascript">
var cellwidth=6; // EACH "CELL" WIDTH IN PIXELS
var cellheight=10; // EACH "CELL" HEIGHT IN PIXELS
var fontsize=9; // FONT SIZE OF THE NUMBERS. SETTING THIS TOO BIG CAUSES UNDESIRED EFFECTS.
var fontcolor="white"; // ENTER ANY HTML OR RGB COLOR CODE
var fontstyle="normal"; // ENTER EITHER BOLD, ITALICS, NONE
var oncolor="#FFFFFF"; // COLOR OF ACTIVE CELLS
var offcolor="#7D7D7D"; // COLOR OF INACTIVE CELLS
//************** DO NOT EDIT BEOND THIS POINT *************//
var NS4 = (document.layers)? true : false;
var IE4 = (document.all && !document.getElementById)? true : false;
var NS6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var binclk;
var now;
var t='<table cellspacing="1" cellpadding="0" border="0"><tr><td align="center"> </td>';
for(i=0;i<=58;i+=2)t+='<td align="left" colspan="2"><font style="font-size:'+fontsize+'px; font-weight:'+fontstyle+'; color: '+fontcolor+'">'+i+'<br> |</font></td>';
t+='<td> </td></tr><tr><td align="center"><font style="font-size:'+fontsize+'px; font-weight:'+fontstyle+'; color: '+fontcolor+'">H: </font></td>';
for(i=0;i<=23;i++)t+=(NS4)? '<td><ilayer name="hrs'+i+'" height="'+cellheight+'" width="'+cellwidth+'" bgcolor="'+offcolor+'"></ilayer></td>' : '<td><div id="hrs'+i+'" style="position:relative; width:'+cellwidth+'px; font-size:1px; height:'+cellheight+'px; background-color:'+offcolor+'"></div></td>';
t+='<td colspan="36"><td> </td></tr><tr><td align="center"><font style="font-size:'+fontsize+'px; font-weight:'+fontstyle+'; color: '+fontcolor+'">M: </font></td>';
for(i=0;i<=59;i++)t+=(NS4)? '<td><ilayer name="min'+i+'" width="'+cellwidth+'" height="'+cellheight+'" bgcolor="'+offcolor+'"></ilayer></td>' : '<td><div id="min'+i+'" style="position:relative; width:'+cellwidth+'px; font-size:1px; height:'+cellheight+'px; background-color:'+offcolor+'"></div></td>';
t+='<td> </td></tr><tr><td align="center"><font style="font-size:'+fontsize+'px; font-weight:'+fontstyle+'; color: '+fontcolor+'">S: </font></td>';
for(i=0;i<=59;i++)t+=(NS4)? '<td><ilayer name="sec'+i+'" width="'+cellwidth+'" height="'+cellheight+'" bgcolor="'+offcolor+'"></ilayer></td>' : '<td><div id="sec'+i+'" style="position:relative; width:'+cellwidth+'px; font-size:1px; height:'+cellheight+'px; background-color:'+offcolor+'"></div></td>';
t+='<td> </td></tr><tr><td> </td><td> </td>';
for(i=1;i<=59;i+=2)t+='<td align="left" colspan="2"><font style="font-size:'+fontsize+'px; font-weight:'+fontstyle+'; color: '+fontcolor+'"> |<br>'+i+'</font></td>';
t+='</tr></table>';
document.write(t);
function getvals(){
now=new Date();
now.s=now.getSeconds();
now.h=now.getHours();
now.m=now.getMinutes();
}
function setclock(){
getvals();
if((now.h==0)&&(now.m==0)) for(i=1;i<=23;i++)setbgcolor('hrs'+i, offcolor);
if((now.s==0)&&(now.m==0)) for (i=1;i<=59;i++)setbgcolor('min'+i, offcolor);
if(now.s==0) for(i=1;i<=59;i++)setbgcolor('sec'+i, offcolor);
setbgcolor('hrs'+now.h, oncolor);
setbgcolor('min'+now.m, oncolor);
setbgcolor('sec'+now.s, oncolor);
}
function setbgcolor(idstr, color){
if(IE4)document.all[idstr].style.backgroundColor=color;
else if(NS4)document.layers[idstr].bgColor=color;
else document.getElementById(idstr).style.backgroundColor=color;
}
window.onload=function(){
getvals();
for(i=0;i<=now.h;i++)setbgcolor('hrs'+i, oncolor);
for(i=0;i<=now.m;i++)setbgcolor('min'+i, oncolor);
for(i=0;i<=now.s;i++)setbgcolor('sec'+i, oncolor);
setInterval('setclock()', 100);
}
window.onresize=function(){
if(NS4)setTimeout('history.go(0)',400);
}
</script>
<script language="javascript">
var binclk;
var now;
var ns4 = (document.layers)? true : false;
var ie4 = (document.all && !document.getElementById)? true : false;
var ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
function setclock(){
now=new Date();
var txt=getstring(now.getHours()+'')+' : '+getstring(now.getMinutes()+'')+' : '+getstring(now.getSeconds()+'');
if(ns4) txt='<div style="position:absolute; top:0px; left:0px"><center><b>'+txt+'</b></center></div>';
writeid(binclk, txt);
}
function writeid(id,text){
if(ns4){
id.document.open();
id.document.write('<div style="position:absolute; left:0px; top:0px;">'+text+'</div>');
id.document.close();
}
else id.innerHTML=text;
}
function getstring(nbr){
while(nbr.length<2) nbr='0'+nbr;
nbr=nbr.split('');
nbr[0]=eval(nbr[0]).toString(2);
nbr[1]=eval(nbr[1]).toString(2);
while(nbr[0].length<4) nbr[0]='0'+nbr[0];
while(nbr[1].length<4) nbr[1]='0'+nbr[1];
return nbr[0]+','+nbr[1];
}
window.onload=function(){
binclk=(ns4)? document.layers['binclk']:(ie4)?document.all['binclk']:document.getElementById('binclk');
setInterval('setclock()', 300);
}
window.onresize=function(){
if(ns4)setTimeout('history.go(0)', 400);
}
</script>
<table border="0" width="480" height="35"><tr><td align="center">
<div id="binclk" style="position:relative; font-size:20px; font-family:Digital Readout ExpUpright; color:#FFFFFF;"></div>
</td></tr></table>
<script language="javascript">
var binclk;
var now;
var ns4 = (document.layers)? true : false;
var ie4 = (document.all && !document.getElementById)? true : false;
var ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
function setclock(){
now=new Date();
var txt=getstring(now.getHours())+' : '+getstring(now.getMinutes())+' : '+getstring(now.getSeconds());
if(ns4) txt='<div style="position:absolute; top:0px; left:0px"><center><b>'+txt+'</b></center></div>';
writeid(binclk, txt);
}
function writeid(id,text){
if(ns4){
id.document.open();
id.document.write('<div style="position:absolute; left:0px; top:0px;">'+text+'</div>');
id.document.close();
}
else id.innerHTML=text;
}
function getstring(nbr){
nbr=nbr.toString(2);
while(nbr.length!=6)nbr='0'+nbr;
return nbr;
}
window.onload=function(){
binclk=(ns4)?document.layers['binclk']:(ie4)?document.all['binclk']:document.getElementById('binclk');
setInterval('setclock()', 300);
}
window.onresize=function(){
if(ns4)setTimeout('history.go(0)', 400);
}
</script>
<table border="0" width="480" height="35"><tr><td align="center">
<div id="binclk" style="position:relative; font-size:20px; font-family:Digital Readout ExpUpright; color:#FFFFFF;"></div>
</td></tr></table>
<script language="javascript">
var hexclk;
var now;
var ns4 = (document.layers)? true : false;
var ie4 = (document.all && !document.getElementById)? true : false;
var ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
function setclock(){
now=new Date();
var txt=getstring(now.getHours())+' : '+getstring(now.getMinutes())+' : '+getstring(now.getSeconds());
if(ns4) txt='<div style="position:absolute; top:0px; left:0px"><center><b>'+txt+'</b></center></div>';
writeid(hexclk, txt);
}
function writeid(id,text){
if(ns4){
id.document.open();
id.document.write('<div style="position:absolute; left:0px; top:0px;">'+text+'</div>');
id.document.close();
}
else id.innerHTML=text;
}
function getstring(nbr){
nbr=nbr.toString(16);
while(nbr.length!=2)nbr='0'+nbr;
return nbr;
}
window.onload=function(){
hexclk=(ns4)?document.layers['hexclk']:(ie4)?document.all['hexclk']:document.getElementById('hexclk');
setInterval('setclock()', 300);
}
window.onresize=function(){
if(ns4)setTimeout('history.go(0)', 400);
}
</script>
<table border="0" width="480" height="35"><tr><td align="center">
<div id="hexclk" style="position:relative; font-size:20px; font-family:Digital Readout ExpUpright; color:#FFFFFF;"></div>
</td></tr></table>