This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Dreamweaver > August 2004 > how to make a calender
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to make a calender
|
|
| VA_Webmaster25 2004-08-13, 12:16 pm |
| I want to make a nice calender for events, but im having such a hard time using tables to make it look nice. anywhere on the web that shows you how to do this..?
thanks
| |
|
|
| VA_Webmaster25 2004-08-13, 12:16 pm |
| this calender seems very complex for me im nto familiar with asp. Im looking for a more simple and easier way to create a calender..im not familiar with database-driven one.
thanks
| |
| terakris 2004-08-13, 12:16 pm |
| Oh ok... sorry.
How complex do you want it to be and what would you like it to do?
| |
| VA_Webmaster25 2004-08-13, 12:16 pm |
| its a calender for a college. I want to show a colorful calender with dates and
events listed for that appropriate day. it woud be nice to have a link on the
top corners to take u to previous or next month.
| |
| Les Matthews 2004-08-13, 12:16 pm |
| "VA_Webmaster25" <webforumsuser@macromedia.com> wrote in message
news:cfiilq$4ae$1@forums.macromedia.com...
> its a calender for a college. I want to show a colorful calender with
dates and
> events listed for that appropriate day. it woud be nice to have a link on
the
> top corners to take u to previous or next month.
>
You probably won't be satisfied with a calendar that doesn't use something
like a database to persist the calendar data. The extension terakris pointed
you to is very good (I use it on this page:
http://www.lhhsalumni.org/LHHS/Calendar.asp).
| |
|
|
| VA_Webmaster25 2004-08-13, 12:16 pm |
| while u are probably correct, im not familiar at all with asp or have never
created a database driven site. some of these places on the web makes
assumptions that you know, so they are not always help for people like me.
| |
| terakris 2004-08-13, 12:16 pm |
| I didnt think those calendars used ASP, but i must admit i didnt look at the
samples. That site provides the code for you to copy & paste most of the time,
which is why i suggested it.
Basicly if you want it to have forward & next buttons to change the calendar
date your going to need some sort of scripting, weather it be javascript, asp,
php etc etc.
If i wasnt at work i would write you something, but i dont have time at the
moment - sorry. If you cant use any of those scripts that ive suggested, i
think you will have trouble using any that people suggest.
| |
| terakris 2004-08-13, 12:16 pm |
| here you go - first one i picked from the list.
<html>
<HEAD>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<style type="text/css">
body {
background-color : #effeff;
}
div.hol {
background-color : yellow;
}
td.outer {
cellpadding : 1em;
border : solid blue;
}
table.inner {
background-color : #efefdd;
font-size : 8pt;
}
</style>
<script type="text/javascript">
var months =
["January","February","March","April","May","June","July","August","September","
October","November","December"];
var daycounts = [31,28,31,30,31,30,31,31,30,31,30,31]; //for leap years,
remember to set february to 29 days
//2002 firstdays = [1,4,4,0,2,5,0,3,6,1,4,6];
var firstdays = [2,5,5,1,3,6,1,4,0,2,5,0];
//2004 firstdays = [3,6,7,3,5,1,3,6,2,4,0,2];
// This is where you put in the appointments. follow pattern
[fromday,frommonth,today,tomonth,message]
var apps = [
[15,3,13,4,"Holiday in New Zealand"],
[12,6,12,6,"my birthday"],
[28,8,2,9,"Trip to Paris"],
[22,11,22,11,"Party with colleagues"],
[20,12,30,12,"Christmas with family"]
];
function CheckDate(month,dayno)
{
var retval = new String(dayno);
var m = month + 1;
for(var app = 0; app < apps.length; app++)
{
if(m == apps[app][1] ) //first month
{
if(apps[app][3] - apps[app][1] > 0)
{
if(dayno >= apps[app][0])
{
retval = "<div class='hol' title='" + apps[app][4] + "'>" +
dayno + "</div>";
}
}
else
{
if(dayno >= apps[app][0] && dayno <= apps[app][2])
{
retval = "<div class='hol' title='" + apps[app][4] + "'>" +
dayno + "</div>";
}
}
}
else if(m == apps[app][3]) // second month
{
if(dayno <= apps[app][2])
{
retval = "<div class='hol' title='" + apps[app][4] + "'>" + dayno
+ "</div>";
}
}
else if( m > apps[app][1] && m < apps[app][3] )
{
retval = "<div class='hol' title='" + apps[app][4] + "'>" + dayno +
"</div>";
}
}
return retval;
}
function PrintMonth(month)
{
var done = false;
var day = 0;
document.write("<table class='inner'><caption><b>" + months[month] +
"</b></caption><thead>");
document.write("<th>Mon</th><th>Tue</th><th>Wed</th><th>Thu</th><th>Fri</th><th>
Sat</th><th>Sun</th></thead>");
while(!done)
{
document.write("<tr>");
PrintWeek(month,day, firstdays[month], daycounts[month]);
document.write("</tr>");
day = day + 7;
if( day > daycounts[month] + firstdays[month])
{
done = true;
}
}
document.write("</tbody></table><p>");
}
function PrintWeek(monthno,start,min,max)
{
var d;
var desc;
for(var j = 0; j < 7; j++)
{
document.write("<td>");
d = start + j;
if(d >= min && d < max + min)
{
desc = CheckDate(monthno,d - min + 1);
document.write(desc);
}
document.write("</td>");
}
}
</script>
</HEAD>
<BODY>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<center><h1>2003 Calendar</h1></center>
Hold mouse over date to see message
<table>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(0);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(1);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(2);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(3);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(4);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(5);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(6);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(7);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(8);
</script>
</td>
</tr>
<tr>
<td class="outer">
<script type="text/javascript">
PrintMonth(9);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(10);
</script>
</td>
<td class="outer">
<script type="text/javascript">
PrintMonth(11);
</script>
</td>
</tr>
</table>
<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>
</body>
</html>
| |
| Sam Poikail 2004-08-13, 11:15 pm |
| Calendar Creator 10
http://www.broderbund.com/ProductGroup.asp?CID=109
Calendars would have to be generated, linked and uploaded to your webhost.
The latest Standard version allows you to save as HTML, the Deluxe version
allows you to save in PDF or HTML format.
If you own Contribute, you can save Calendars in Flashpaper format.
If none of the above works for you, you might want to look at this:
http://www.valleywebdesigns.com/vwd_csscalhelp.asp
Cheers,
Sam
"VA_Webmaster25" <webforumsuser@macromedia.com> wrote in message
news:cfikfr$6b9$1@forums.macromedia.com...
> while u are probably correct, im not familiar at all with asp or have
never
> created a database driven site. some of these places on the web makes
> assumptions that you know, so they are not always help for people like me.
>
| |
| VA_Webmaster25 2004-08-15, 11:15 pm |
| this calender seems very complex for me im nto familiar with asp. Im looking for a more simple and easier way to create a calender..im not familiar with database-driven one.
thanks
|
|
|
| | Copyright 2003 - 2009 forum4designers.com Software forum Computer Hardware reviews |
|