Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default A Basic Code For A Clock :P

    <html>

    <head>

    </head>
    <body onLoad="goforit()">
    <script>



    var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thu rsday","Friday","Saturday")
    var montharray=new Array("January","February","March","April","May"," June","July","August","September","October","Novem ber","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="<small><font color='000000' face='Arial'><b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+" "+hours+":"+minutes+":"+seconds+" "+dn
    +"</b></font></small>"
    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>

    </body>

    </html>

  2. #2
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    I'll test it now..

    Good work I think

    --
    Regards

    EDIT = 900th Post :eusa_danc
    The one and only

    Instagram (/needsy)
    Twitter

  3. #3
    Join Date
    Jul 2005
    Posts
    1,653
    Tokens
    50

    Latest Awards:

    Default

    Alot of code is not needed, looks like you ripped it.

  4. #4
    Join Date
    Nov 2004
    Location
    Daventry, Northants
    Posts
    1,510
    Tokens
    0

    Latest Awards:

    Default

    Why not just use

    1. For the time script
    PHP Code:
    <?PHP echo date("H:i:s"); ?>
    2. For the date script
    PHP Code:
    <?PHP echo date("d/m/y"); ?>

  5. #5
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    I didnt rip it :s Its How i make Clocks i dont know any other way, If there is s simpler way plz tell me how lmao, i also have an affliates sysyem code which xEnigma gave me with the layout i bought

  6. #6
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Yes it works but I do agree with the others to rather a long script... Try shortening it down :s
    The one and only

    Instagram (/needsy)
    Twitter

  7. #7
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    i have an affliates code which xenigma gave me wen i bought a layout off him

  8. #8
    Join Date
    Nov 2004
    Location
    Daventry, Northants
    Posts
    1,510
    Tokens
    0

    Latest Awards:

    Default

    You cant shoten javascript 4fs
    And who cares if its long, Its not as if you see any of it

  9. #9
    Join Date
    Jul 2005
    Location
    Bristol
    Posts
    2,054
    Tokens
    -10

    Latest Awards:

    Default

    I was Being Sarcastic In my Post ''/

Posting Permissions

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