Results 1 to 5 of 5

Thread: putting an LCD clock on my page using the HTML code
      
   

  1. #1
    dovidshmuel's Avatar
    dovidshmuel is offline First Lieutenant
    Join Date
    Sep 2008
    Location
    Jerusalem, Israel
    Posts
    167

    Default putting an LCD clock on my page using the HTML code

    I found a free LCD clock from DynamicDrive.com. They supply the script. The first part they told me to put in the Head section of my page, which I did. The second part of the script, they say to "add the script where you wish the clock to appear on your page." Can someone tell me exactly how to do that? It does not work by putting it into a text box and positioning that on the page, and if I insert the script into "start of page" or "inside body tag", it shows on the very first line of the page. But how do I position it to a specific location of the page? As you can see, I know nothing about these things, so any help will be much appreciated.

    "You can't know if you've never been told."

    Thanks,
    DovidShmuel

  2. #2
    Tom Finley's Avatar
    Tom Finley is offline Brigadier General
    Join Date
    Mar 2008
    Location
    Kauai, HI
    Posts
    1,299

    Default Re: putting an LCD clock on my page using the HTML code

    That part would go into an html box, not a text box. There is an icon on the left side of BV that will open an html box. You paste the second code in there and move the box to where you want it on the page. You may need to preview the page several times to get the location exactly where you want it. Also, I can't remember if this will show up in Preview mode--you may have to publish to see it.
    CLAMcentral.com Children's Ministry resources
    CLAMcentral's Projects Blog
    CLAMbakeonline.com Family Fun

  3. #3
    dovidshmuel's Avatar
    dovidshmuel is offline First Lieutenant
    Join Date
    Sep 2008
    Location
    Jerusalem, Israel
    Posts
    167

    Default Re: putting an LCD clock on my page using the HTML code

    Thanks. That did it. It does show up in a previewed page. Could you tell me how I can alter the code so that the size of the clock is bigger?

  4. #4
    Tom Finley's Avatar
    Tom Finley is offline Brigadier General
    Join Date
    Mar 2008
    Location
    Kauai, HI
    Posts
    1,299

    Default Re: putting an LCD clock on my page using the HTML code

    hee hee, probably not. You can try two things, in order:

    1. Check the info over at DD to see if it tells you there (you'd have to import the code into Notepad to modify because BV can't do that)
    2. Post the code here so someone can explain.
    CLAMcentral.com Children's Ministry resources
    CLAMcentral's Projects Blog
    CLAMbakeonline.com Family Fun

  5. #5
    dovidshmuel's Avatar
    dovidshmuel is offline First Lieutenant
    Join Date
    Sep 2008
    Location
    Jerusalem, Israel
    Posts
    167

    Default Re: putting an LCD clock on my page using the HTML code

    Here's the code. Can someone explain?

    <span id="digitalclock" class="styling"></span>
    <script>
    <!--
    /*****************************************
    * LCD Clock script- by Javascriptkit.com
    * Featured on/available at http://www.dynamicdrive.com/
    * This notice must stay intact for use
    *****************************************/
    var alternate=0
    var standardbrowser=!document.all&&!document.getElemen tById
    if (standardbrowser)
    document.write('<form name="tick"><input type="text" name="tock" size="6"></form>')
    function show(){
    if (!standardbrowser)
    var clockobj=document.getElementById? document.getElementById("digitalclock") : document.all.digitalclock
    var Digital=new Date()
    var hours=Digital.getHours()
    var minutes=Digital.getMinutes()
    if (hours.toString().length==1)
    hours="0"+hours
    if (minutes<=9)
    minutes="0"+minutes
    if (standardbrowser){
    if (alternate==0)
    document.tick.tock.value=hours+" : "+minutes
    else
    document.tick.tock.value=hours+" "+minutes
    }
    else{
    if (alternate==0)
    clockobj.innerHTML=hours+"<font color='lime'>&nbsp;:&nbsp;</font>"+minutes
    else
    clockobj.innerHTML=hours+"<font color='black'>&nbsp;:&nbsp;</font>"+minutes
    }
    alternate=(alternate==0)? 1 : 0
    setTimeout("show()",1000)
    }
    window.onload=show
    //-->
    </script>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49