Re: Javascript Clock
Hungarian. -Original Message- From: Arnold Shore [mailto:[EMAIL PROTECTED]] Sent: Friday, February 08, 2002 18:41 To: [EMAIL PROTECTED] Subject: Re: Javascript Clock Dynamite! I've changed the arrays to English, but what language are the days/months? I don't recognize them. Arnold Shore Annapolis, MD USA -Original Message- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Ganszky, Balazs (GEL,NonGE,MSX) Sent: Friday, February 08, 2002 6:31 AM To: [EMAIL PROTECTED] Subject: Sorry, I had to share it with you. Try it it is a HTML file... !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META content=MSHTML 6.00.2600.0 name=GENERATOR/HEAD === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com === To unsubscribe: mailto [EMAIL PROTECTED] with body: signoff JSP-INTEREST. For digest: mailto [EMAIL PROTECTED] with body: set JSP-INTEREST DIGEST. Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
[no subject]
Sorry, I had to share it with you. Try it it is a HTML file... !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META content=MSHTML 6.00.2600.0 name=GENERATOR/HEAD BODY SCRIPT language=JavaScript dCol='00';//date colour. fCol='00';//face colour. sCol='00';//seconds colour. mCol='00';//minutes colour. hCol='00';//hours colour. ClockHeight=40; ClockWidth=40; ClockFromMouseY=0; ClockFromMouseX=100; //Alter nothing below! Alignments will be lost! d=new Array(Vasarnap,Hetf#337;,Kedd,Szerda,Csutortok,Pentek,Szombat ,Vasarnap); m=new Array(Januar,Februar,Marcius,Aprilis,Majus,Junus,Julius,Augus ztus,Szeptember,Oktober,November,December); date=new Date(); day=date.getDate(); year=date.getYear(); if (year 2000) year=year+1900; TodaysDate= +d[date.getDay()]+ +day+ +m[date.getMonth()]+ +year; D=TodaysDate.split(''); H='...'; H=H.split(''); M=''; M=M.split(''); S='.'; S=S.split(''); Face='1 2 3 4 5 6 7 8 9 10 11 12'; font='Arial'; size=1; speed=0.6; ns=(document.layers); ie=(document.all); Face=Face.split(' '); n=Face.length; a=size*10; ymouse=0; xmouse=0; scrll=0; props=font face=+font+ size=+size+ color=+fCol+B; props2=font face=+font+ size=+size+ color=+dCol+B; Split=360/n; Dsplit=360/D.length; HandHeight=ClockHeight/4.5 HandWidth=ClockWidth/4.5 HandY=-7; HandX=-2.5; scrll=0; step=0.06; currStep=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0} Dy=new Array();Dx=new Array();DY=new Array();DX=new Array(); for (i=0; i D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0} if (ns){ for (i=0; i D.length; i++) document.write('layer name=nsDate'+i+' top=0 left=0 height='+a+' width='+a+'center'+props2+D[i]+'/font/center/layer'); for (i=0; i n; i++) document.write('layer name=nsFace'+i+' top=0 left=0 height='+a+' width='+a+'center'+props+Face[i]+'/font/center/layer'); for (i=0; i S.length; i++) document.write('layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+sCol+'centerb'+S[i]+'/b/center/font/layer'); for (i=0; i M.length; i++) document.write('layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+mCol+'centerb'+M[i]+'/b/center/font/layer'); for (i=0; i H.length; i++) document.write('layer name=nsHours'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+hCol+'centerb'+H[i]+'/b/center/font/layer'); } if (ie){ document.write('div id=Od style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i D.length; i++) document.write('div id=ieDate style=position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align: center'+props2+D[i]+'/B/font/div'); document.write('/div/div'); document.write('div id=Of style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i n; i++) document.write('div id=ieFace style=position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align: center'+props+Face[i]+'/B/font/div'); document.write('/div/div'); document.write('div id=Oh style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i H.length; i++) document.write('div id=ieHours style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+hCol+';text-align:center;font-weight:bold'+H[i]+'/div'); document.write('/div/div'); document.write('div id=Om style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i M.length; i++) document.write('div id=ieMinutes style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+mCol+';text-align:center;font-weight:bold'+M[i]+'/div'); document.write('/div/div') document.write('div id=Os style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i S.length; i++) document.write('div id=ieSeconds style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+sCol+';text-align:center;font-weight:bold'+S[i]+'/div'); document.write('/div/div') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ //ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY ; //xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; ymouse = 80; xmouse = 80; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Od.style.top=window.document.body.scrollTop; Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i n; i++){ var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style; F.top=y[i] +
Offtopic again
Sorry it was the code modified by me. Here is the original one !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN HTMLHEAD META http-equiv=Content-Type content=text/html; charset=windows-1252 META content=MSHTML 6.00.2600.0 name=GENERATOR/HEAD BODY SCRIPT language=JavaScript dCol='00';//date colour. fCol='00';//face colour. sCol='00';//seconds colour. mCol='00';//minutes colour. hCol='00';//hours colour. ClockHeight=40; ClockWidth=40; ClockFromMouseY=0; ClockFromMouseX=100; //Alter nothing below! Alignments will be lost! d=new Array(SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY ); m=new Array(JANUARY,FEBRUARY,MARCH,APRIL,MAY,JUNE,JULY,AUGUST,SEP TEMBER,OCTOBER,NOVEMBER,DECEMBER); date=new Date(); day=date.getDate(); year=date.getYear(); if (year 2000) year=year+1900; TodaysDate= +d[date.getDay()]+ +day+ +m[date.getMonth()]+ +year; D=TodaysDate.split(''); H='...'; H=H.split(''); M=''; M=M.split(''); S='.'; S=S.split(''); Face='1 2 3 4 5 6 7 8 9 10 11 12'; font='Arial'; size=1; speed=0.6; ns=(document.layers); ie=(document.all); Face=Face.split(' '); n=Face.length; a=size*10; ymouse=0; xmouse=0; scrll=0; props=font face=+font+ size=+size+ color=+fCol+B; props2=font face=+font+ size=+size+ color=+dCol+B; Split=360/n; Dsplit=360/D.length; HandHeight=ClockHeight/4.5 HandWidth=ClockWidth/4.5 HandY=-7; HandX=-2.5; scrll=0; step=0.06; currStep=0; y=new Array();x=new Array();Y=new Array();X=new Array(); for (i=0; i n; i++){y[i]=0;x[i]=0;Y[i]=0;X[i]=0} Dy=new Array();Dx=new Array();DY=new Array();DX=new Array(); for (i=0; i D.length; i++){Dy[i]=0;Dx[i]=0;DY[i]=0;DX[i]=0} if (ns){ for (i=0; i D.length; i++) document.write('layer name=nsDate'+i+' top=0 left=0 height='+a+' width='+a+'center'+props2+D[i]+'/font/center/layer'); for (i=0; i n; i++) document.write('layer name=nsFace'+i+' top=0 left=0 height='+a+' width='+a+'center'+props+Face[i]+'/font/center/layer'); for (i=0; i S.length; i++) document.write('layer name=nsSeconds'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+sCol+'centerb'+S[i]+'/b/center/font/layer'); for (i=0; i M.length; i++) document.write('layer name=nsMinutes'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+mCol+'centerb'+M[i]+'/b/center/font/layer'); for (i=0; i H.length; i++) document.write('layer name=nsHours'+i+' top=0 left=0 width=15 height=15font face=Arial size=3 color='+hCol+'centerb'+H[i]+'/b/center/font/layer'); } if (ie){ document.write('div id=Od style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i D.length; i++) document.write('div id=ieDate style=position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align: center'+props2+D[i]+'/B/font/div'); document.write('/div/div'); document.write('div id=Of style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i n; i++) document.write('div id=ieFace style=position:absolute;top:0px;left:0;height:'+a+';width:'+a+';text-align: center'+props+Face[i]+'/B/font/div'); document.write('/div/div'); document.write('div id=Oh style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i H.length; i++) document.write('div id=ieHours style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+hCol+';text-align:center;font-weight:bold'+H[i]+'/div'); document.write('/div/div'); document.write('div id=Om style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i M.length; i++) document.write('div id=ieMinutes style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+mCol+';text-align:center;font-weight:bold'+M[i]+'/div'); document.write('/div/div') document.write('div id=Os style=position:absolute;top:0px;left:0pxdiv style=position:relative'); for (i=0; i S.length; i++) document.write('div id=ieSeconds style=position:absolute;width:16px;height:16px;font-family:Arial;font-size: 16px;color:'+sCol+';text-align:center;font-weight:bold'+S[i]+'/div'); document.write('/div/div') } (ns)?window.captureEvents(Event.MOUSEMOVE):0; function Mouse(evnt){ ymouse = (ns)?evnt.pageY+ClockFromMouseY-(window.pageYOffset):event.y+ClockFromMouseY ; xmouse = (ns)?evnt.pageX+ClockFromMouseX:event.x+ClockFromMouseX; } (ns)?window.onMouseMove=Mouse:document.onmousemove=Mouse; function ClockAndAssign(){ time = new Date (); secs = time.getSeconds(); sec = -1.57 + Math.PI * secs/30; mins = time.getMinutes(); min = -1.57 + Math.PI * mins/30; hr = time.getHours(); hrs = -1.575 + Math.PI * hr/6+Math.PI*parseInt(time.getMinutes())/360; if (ie){ Od.style.top=window.document.body.scrollTop; Of.style.top=window.document.body.scrollTop; Oh.style.top=window.document.body.scrollTop; Om.style.top=window.document.body.scrollTop; Os.style.top=window.document.body.scrollTop; } for (i=0; i n; i++){ var F=(ns)?document.layers['nsFace'+i]:ieFace[i].style; F.top=y[i] + ClockHeight*Math.sin(-1.0471 + i*Split*Math.PI/180)+scrll;