Results 1 to 8 of 8

Thread: DD get date and time script

  1. #1
    Join Date
    Jul 2005
    Location
    Springfield, GA, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD get date and time script(http://www.dynamicdrive.com/dynamicindex6/clock3.htm)

    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
    ----------------------------------------------------------------

    <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">&nbsp;</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">&copy;2003
    webtemplateszone</font></a></div>
    </td>
    </tr>
    </table>
    </body>
    </html>
    Last edited by ObiCat36; 07-24-2005 at 03:50 PM. Reason: forgot link

  2. #2
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I don't see the time blinking.. Looks fine to me!

    What sorry??

  3. #3
    Join Date
    Jul 2005
    Location
    Springfield, GA, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am using Netscape 7.2 could there be a glitch? It worked fine at first till I started to add stuff to my page, and now it's blinking. (To me like a light bulb before it completely goes, or is loose and goes on and off) I know I wasn't seein things!
    ObiCat

  4. #4
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I am not saying you are, but it is working fine on IE FX and Mozilla so... LOL!

    NS 7 isnt the best browser, but it may have just been the situation. Best bet, go to the place where you got the script and it will say which browsers support it. =)

  5. #5
    Join Date
    Jul 2005
    Location
    Springfield, GA, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Uh, got it here. That's why it's posted here. ;-)
    Thanks anyway. Too tired to work on it tonight. I'll check it tomorrow. Just wondered if I had an extra tag or something in the page that made it act weird.
    Thanks Daniel!
    :-)
    ObiCat

  6. #6
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i figured that lol

    I am just saying, go to the location of the dl.. like which page.. and it says, wonderfully of this site, which browsers support it correctly.. it doesnt blink on my screen is all i can tell you.

  7. #7
    Join Date
    Jul 2005
    Location
    Springfield, GA, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I appreciate your help!
    ObiCat

  8. #8
    Join Date
    Jul 2005
    Location
    cali
    Posts
    95
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    No problem..

    Heh, compliments to your site

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •