ObiCat36
07-24-2005, 03:42 PM
This is my first time here asking a question, so I hope I did everything right!
I am trying to center the time/date in my page, and I got that to work, but now the date and time are blinking like there's something wrong.
I am including my page html and the script. Can someone tell me what's wrong?
Thanks in advance,
ObiCat35 ;)
Here's the link to see the blink....pardunthepun
ObiCat's Web Portal (http://obicatswebportal.5u.com/contact.html)
----------------------------------------------------------------
<html>
<head>
<title>ObiCat's Web Portal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="goforit()" body bgcolor="#000000" text="#66ccff" link="#cc99ff" vlink="#ccccff" alink="#66ccff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="26%"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="261" height="600">
<param name=movie value="icedragonmenu.swf">
<param name=quality value=high>
<embed src="icedragonmenu.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="261" height="600">
</embed>
</object></td>
<td width="74%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="376">
<tr>
<td valign="top"><img src="top2.jpg" width="504" height="180"></td>
</tr>
<tr>
<td valign="top"><img src="contactheader.jpg" width="273" height="28"></td>
</tr>
<tr>
<td valign="top">
<table width="499" border="0" cellspacing="1" cellpadding="1" bgcolor="#3366CC">
<tr>
<td valign="top">
<table width="495" border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr>
<td valign="top">
<p><font size="2" face="Arial, Helvetica, sans-serif">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" height="21"> </td>
</tr>
</table>
</td>
</tr>
</table>
<script>
/*
Live Date Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<center><small><font color='66ccff' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small></center>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
</script>
<span id="clock"></span>
<br><br><br><br><br>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<div align="center"><a href="http://www.webtemplateszone.com"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">©2003
webtemplateszone</font></a></div>
</td>
</tr>
</table>
</body>
</html>
I am trying to center the time/date in my page, and I got that to work, but now the date and time are blinking like there's something wrong.
I am including my page html and the script. Can someone tell me what's wrong?
Thanks in advance,
ObiCat35 ;)
Here's the link to see the blink....pardunthepun
ObiCat's Web Portal (http://obicatswebportal.5u.com/contact.html)
----------------------------------------------------------------
<html>
<head>
<title>ObiCat's Web Portal</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body onLoad="goforit()" body bgcolor="#000000" text="#66ccff" link="#cc99ff" vlink="#ccccff" alink="#66ccff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td width="26%"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="261" height="600">
<param name=movie value="icedragonmenu.swf">
<param name=quality value=high>
<embed src="icedragonmenu.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="261" height="600">
</embed>
</object></td>
<td width="74%">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="376">
<tr>
<td valign="top"><img src="top2.jpg" width="504" height="180"></td>
</tr>
<tr>
<td valign="top"><img src="contactheader.jpg" width="273" height="28"></td>
</tr>
<tr>
<td valign="top">
<table width="499" border="0" cellspacing="1" cellpadding="1" bgcolor="#3366CC">
<tr>
<td valign="top">
<table width="495" border="0" cellspacing="1" cellpadding="1" bgcolor="#000000">
<tr>
<td valign="top">
<p><font size="2" face="Arial, Helvetica, sans-serif">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" height="21"> </td>
</tr>
</table>
</td>
</tr>
</table>
<script>
/*
Live Date Script-
© Dynamic Drive (www.dynamicdrive.com)
For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use,
visit http://www.dynamicdrive.com
*/
var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym<10)
daym="0"+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn="AM"
if (hours>=12)
dn="PM"
if (hours>12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes<=9)
minutes="0"+minutes
if (seconds<=9)
seconds="0"+seconds
//change font size here
var cdate="<center><small><font color='66ccff' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
+"</b></font></small></center>"
if (document.all)
document.all.clock.innerHTML=cdate
else if (document.getElementById)
document.getElementById("clock").innerHTML=cdate
else
document.write(cdate)
}
if (!document.all&&!document.getElementById)
getthedate()
function goforit(){
if (document.all||document.getElementById)
setInterval("getthedate()",1000)
}
</script>
<span id="clock"></span>
<br><br><br><br><br>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td>
<div align="center"><a href="http://www.webtemplateszone.com"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">©2003
webtemplateszone</font></a></div>
</td>
</tr>
</table>
</body>
</html>