Results 1 to 2 of 2

Thread: HTML code help
      
   

  1. #1
    sunny152 is offline Sergeant First Class
    Join Date
    Jan 2007
    Posts
    52

    Default 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.

  2. #2
    navaldesign's Avatar
    navaldesign is offline General & Forum Moderator
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    12,115

    Default 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!


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