HTML code help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • sunny152
    Sergeant First Class

    • Jan 2007
    • 52

    HTML code help

    Hi Everybody,
    I have downloaded digital clock code from http://clocklink.com
    It displays date as follows- 31st/may/07 thurs 07:13:35 p.m
    So,now i wan't to modify the HTML by removing time and to display only date/month/year/week as- 31st/may/07 thurs
    So,please let me know how to modify this HTML Code.The code is

    <script src="<A href="http://www.clocklink.com/embed.js"></script><script">http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5004-green.swf";obj.TimeZone = "NZT";obj.width = 192;obj.height = 16;obj.Place = "";obj.DateFormat = "d / MMM / yy DDD";obj.TimeFormat = "hh:mm:ss TT";obj.wmode = "transparent";showClock(obj);</script>


    Thanks,
    SUNNY.
  • navaldesign
    General & Forum Moderator

    • Oct 2005
    • 12080

    #2
    Re: HTML code help

    I can't see your clock (i miss the swf file). For a simple clock, use this code:

    <form name=myForm>
    <input type=text style="position:absolute;width:180px;border:1px #000080 solid;background-color:#E1F1FF;color:#000080;font-family:Arial;font-size:12 "value="Loading..." name=clock></form>
    <SCRIPT LANGUAGE="JavaScript"><!--
    function runClock(){
    theTime = window.setTimeout("runClock()", 1000);
    d = new Date();
    day = d.getDay();
    mon = d.getMonth();
    date = d.getDate();
    year = d.getYear();
    hr = d.getHours();
    min = d.getMinutes();
    sec = d.getSeconds();
    if(year<1000){year=(""+(year+11900)).substring(1,5 );}
    else{year=(""+(year+10000)).substring(1,5);}
    if(hr==0){ap=" AM";hr=12}
    else if(hr <= 11){ap=" AM"}
    else if(hr == 12){ap=" PM";hr=12}
    else if(hr >= 13){ap=" PM";hr-=12}
    if(min <= 9){min="0"+min}
    if(sec <= 9){sec="0"+sec}
    zday=new Array();
    zday=["Sunday","Monday","Tuesday","Wednesday","Thurs day" ,"Friday","Saturday"];
    zmon=new Array();
    zmon=["January","February","March","April","May","Ju ne", "July","August","September","October","Novembe r"," December"];
    document.myForm.clock.value=""+zday[day]+", "+zmon[mon]+" "+date+", "+year+" ";}
    runClock();
    //--></script>

    Paste it in a HTML box in your page. You can also change the text formatting, color etc as well as the dimensions of the box, by chaning the parts in red.

    For your own code try:

    <script src="<A href="http://www.clocklink.com/embed.js"></script><script">http://www.clocklink.com/embed.js"></script><script type="text/javascript" language="JavaScript">obj = new Object;obj.clockfile = "5004-green.swf";obj.TimeZone = "NZT";obj.width = 192;obj.height = 16;obj.Place = "";obj.DateFormat = "d / MMM / yy DDD";obj.wmode = "transparent";showClock(obj);</script>

    Navaldesign
    Logger Lite: Low Cost, Customizable, multifeatured Login script
    Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
    DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
    Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

    Comment

    Working...
    X