Announcement

Collapse
No announcement yet.

putting an LCD clock on my page using the HTML code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


    • #3
      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?

      Comment


      • #4
        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

        Comment


        • #5
          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>

          Comment

          Working...
          X