Results 1 to 4 of 4

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: need a html clock

  1. #1
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    Default need a html clock
    hey guys im trying to make a theme and need help with this clock
    if any of you guys could help me get the clock similar to this

    i would like to make the time like this



    on this


    any help would be much appreciated.
    also could you please share the code as im useless with this stuff

    if you could get this to work for me i would have you babies
    Last edited by heath_rox; 2008-09-25 at 02:13 PM.
    "Its better to be a pirate than join the navy"Steve Jobs

  2. #2

  3. #3
    This wallpaper.html file contains a digital clock and the weather widget. Im not going to pull the data out of it and sort it all though.

    Youre going to need all of the files that go with it, so I rar'ed it up. Its too big to attach as a single file per the forum rules.

    HTML Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <html><head>
        <base href="Private/"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
        <style>
            body {
                background-color: none;
                margin: 5px;
                padding: 303px 0px 0px 83px;
                height: 480px;
                width: 320px;
            }
    	</style>
    	<script type="text/javascript" src="configureMe.js"/>
    	<script type="text/javascript" src="Wallpaper.js"/>
    
    </head>
    <body onload="onLoad()">
    
    <table>
    <td height="40" border="5">
    <img src="dg8.gif" name="hr1" width="31" heigth="66"><img 
    src="dg8.gif" name="hr2" width="31" heigth="66"><img 
    src="dgc.gif" name="c" width="18" heigth="66"><img 
    src="dg8.gif" name="mn1" width="31" heigth="66"><img 
    src="dg8.gif" name="mn2" width="31" heigth="66"><img 
    </td></table>
    
    <script type="text/javascript"><!-- start
    // created: 2000-2004 ricocheting.com
    // http://www.ricocheting.com/js/
    
    dg0 = new Image();dg0.src = "dg0.gif";
    dg1 = new Image();dg1.src = "dg1.gif";
    dg2 = new Image();dg2.src = "dg2.gif";
    dg3 = new Image();dg3.src = "dg3.gif";
    dg4 = new Image();dg4.src = "dg4.gif";
    dg5 = new Image();dg5.src = "dg5.gif";
    dg6 = new Image();dg6.src = "dg6.gif";
    dg7 = new Image();dg7.src = "dg7.gif";
    dg8 = new Image();dg8.src = "dg8.gif";
    dg9 = new Image();dg9.src = "dg9.gif";
    dgam= new Image();dgam.src= "dgam.gif";
    dgpm= new Image();dgpm.src= "dgpm.gif";
    dgc = new Image();dgc.src = "dgc.gif";
    dgz = new Image();dgz.src = "dgz.gif";
    
    d = new Date();
    hr= d.getHours()+100;
    mn= d.getMinutes()+100;
    se= d.getSeconds()+100;
    if(hr==100){hr=112;am_pm='am';}
    else if(hr<112){am_pm='am';}
    else if(hr==112){am_pm='pm';}
    else if(hr>112){am_pm='pm';hr=(hr-12);}
    tot=''+hr+mn+se;
    document.hr1.src = 'dg'+tot.substring(1,2)+'.gif';
    document.hr2.src = 'dg'+tot.substring(2,3)+'.gif';
    document.mn1.src = 'dg'+tot.substring(4,5)+'.gif';
    document.mn2.src = 'dg'+tot.substring(5,6)+'.gif';
    //document.se1.src = 'dg'+tot.substring(7,8)+'.gif';
    //document.se2.src = 'dg'+tot.substring(8,9)+'.gif';
    
    
    
    function dotime(){ 
    theTime=setTimeout('dotime()',1000);
    d = new Date();
    hr= d.getHours()+100;
    mn= d.getMinutes()+100;
    se= d.getSeconds()+100;
    if(hr==100){hr=112;am_pm='am';}
    else if(hr<112){am_pm='am';}
    else if(hr==112){am_pm='pm';}
    else if(hr>112){am_pm='pm';hr=(hr-12);}
    tot=''+hr+mn+se;
    
    if (se%2==0){document.c.src = 'dgz.gif';}
    else {document.c.src = 'dgc.gif';}
    
    if (mn==100) {
    document.hr1.src = 'dg'+tot.substring(1,2)+'.gif';
    document.hr2.src = 'dg'+tot.substring(2,3)+'.gif';
    }
    if (se==101) {
    document.mn1.src = 'dg'+tot.substring(4,5)+'.gif';
    document.mn2.src = 'dg'+tot.substring(5,6)+'.gif';
    }
    //document.se1.src = 'dg'+tot.substring(7,8)+'.gif';
    //document.se2.src = 'dg'+tot.substring(8,9)+'.gif';
    }
    dotime();
    //end -->
    </script>
    
    <div id="WeatherContainer">
    <div id="TextContainer">
    <p id="temp">-ΒΊ</p>
    <p id="desc">-</p>
    </div>
    <img id="weatherIcon" src=""/>
    </div>
    <div id="Dummy">
    <p id="city">Loading...</p>
    </div>
    </body></html>
    Attached Files Attached Files
    Last edited by ProjectGSX; 2008-09-25 at 09:15 PM.

  4. The Following User Says Thank You to ProjectGSX For This Useful Post:

    heath_rox (2008-09-26)

  5. #4
    Livin the iPhone Life heath_rox's Avatar
    Join Date
    Nov 2007
    Location
    Liberty City
    Posts
    1,292
    Thanks
    120
    Thanked 205 Times in 117 Posts

    thanks! any directions what do you do with the code as i siad im useless with this stuff
    Last edited by heath_rox; 2008-09-26 at 01:00 AM.
    "Its better to be a pirate than join the navy"Steve Jobs

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