Results 1 to 6 of 6

Thread: Basic Calender

  1. #1
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Basic Calender

    Dear buddies,
    I went through the dynamicdrive website and i found it is very helpful. In this i am trying to use the basic calender but what i need is i don't want the last column of the days.

    Please help me soon.

    Thanks
    UserDynamic

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    copy all the code, and paste it into blank html.
    Code:
    <html>
    
    	<head></head>
    	<style type="text/css">
    	        body {
                color: white;
                }
        </style>
    
    	<body bgcolor = "black">
    	<table border="0">
    		<tr>
    			<td>
    				<script language="JavaScript">
    				function show() {
    					var date = new Date();
    					time = date.toLocaleString();
    					document.write("<div align=center>"+time+"</div>");
    					document.write("<p><strong>Todays</strong></p>");
    					}
    						function array_month(m0, m1, m2, m3, m4, m5, m6, m7, m8, m9, m10, m11)
    					{
    						this[0] = m0;this[1] = m1;this[2] = m2;this[3] = m3;this[4] = m4;this[5] = m5;this[6] = m6;this[7] = m7;this[8] = m8;this[9] = m9;this[10] = m10;this[11] = m11;
    					}
    				function calender()
    					{
    						var date = new Date();
    						var day;
    						var jumlah_day = new array_month(31, 28, 31, 30, 31, 30, 31, 31, 30,31, 30, 31);
    						year = date.getYear() + 1900;
    						day = date.getDate();
    						var kolom_tabel = 0;
    						if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0))
    							jumlah_day[1] = 29;
    							total_day = jumlah_day[date.getMonth()];
    							value_day = date;
    							value_day.setDate(1);
    							cek_day = value_day.getDate();
    						if (cek_day == 2)
    							value_day.setDate(0);
    							show_day = value_day.getDay();
    							document.write("<TABLE><TR><TH>Sun<TH>Mon<TH>Tue<TH>Wed<TH>Thr<TH>Fri<TH>Sat<TR>");
    						for (i=0; i<show_day; i++)
    						{
    							document.write("<TD>");
    							kolom_tabel++;
    						}
    						for (i=1; i<=total_day; i++)
    						{
    							document.write("<TD>");
    							if (i == day)
    								document.write("<strong><FONT COLOR=red>")
    								document.write(i);
    							if (i == day)
    								document.write("</FONT></strong>")
    								kolom_tabel++;
    							if (kolom_tabel == 7)
    							{
    								document.write("<TR>");
    								kolom_tabel = 0;
    							}
    						}
    						document.write("</TABLE>");
    					}
    
    				show();
    				calender();
    
    				</script>
    			</td>
    		</tr>
    		</table>
    		</body>
    
    </html>
    good luck...

  3. #3
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Davelf,
    Thanks you very much for prompt reply. I want to use your basic calender which you have designed in your web. But only thing is that i just want to remove the last row since there is extra rows and occupying the spaces in my web.

    Please do help to me and it is very in need.

    Thanks you
    Userdynamic

  4. #4
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    sorry but i don't see any extra row here, can you give a link to your page, or some screen shoot about that extra row.

  5. #5
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your support, i have solved as per what you said. Looking for more help in future.

  6. #6
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    your welcome, just post your question at this forum in the future, hehe.

Bookmarks

Posting Permissions

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