PDA

View Full Version : JavaScript Calendar won't display?



web88js
02 Aug 2007, 01:51 PM
hello everyone:

I am trying to insert a javascript calendar into my home page. I first tried to insert the script
into a single page, it worked. Then I try to add the script into my home page, but the calendar won't
display on my home page (http://cuj06.com/home_page/home_page_layout.html).

I created a folder structure image to show my folder structure (http://www.cuj06.com/home_page/calendar-file-structure.gif).

please check my code and give me some suggestion to help solve the problem.

I got the calendar script from this website (http://www.bigwebmaster.com/1800.html)

My html code:


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>home page layout</title>
<link rel="stylesheet" type="text/css" href="global.css" />

</head>

<body>
<p style="text-align: center;"><img src="home page logo1.jpg" alt="home page logo" width="650" height="108" border="0" /></p>
<div id="nav_bar">
<ul>
<li><a href="biography.html">Biography</a></li>
<!--
submenu for projects
-->
<li>
<a href="#">Projects</a>
<ul>
<li><a href="projects/coin74/index.html">Dreamweaver Project</a></li>
<li><a href="projects/coin61/index.html">Begining HTML Project</a></li>
<li><a href="projects/coin63/final.shtml">Advanced HTML Project</a></li>
<li><a href="projects/psme/index.html">Intern Project</a></li>
</ul>
</li>
<li><a href="#">Hobby</a></li>
<li><a href="#">Friends</a></li>
</ul>
</div><!-- end of nav_bar section -->

<!--
browser detection
try to put this javascript into a separate folder.
link to javascript file to save space
-->
<div id="browser_detect">
<!-- link to external javascript for browser detection -->
<script src="javascript/browser_detection.js" type="text/javascript"></script>
</div>

<!-- ****** display calendar ****** -->
<!-- <div id="calendar_display"> -->
<script src="javascript/basiccalendar.js" type="text/javascript" >

/***********************************************
* Basic Calendar-By Brian Gosselin at http://scriptasylum.com/bgaudiodr/
*Script featured on Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<!-- </div> -->
</body>

</html>


CSS code:

/*
style sheet governs general layout for home page and other pages
*/

body
{
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
behavior: url(csshover.htc);
background-color: #faf0e6;
}

#nav_bar
{
margin: 20px;
height: 28px;
}

#browser_detect
{
margin: 0 0 0 60px; /*align box model with nav bar */
width: 100px;
position: relative; top: 0px; left: 0px;
border-top: 0px;
background: orange;
}
ul
{
list-style: none;
margin-bottom: 0;
width: 600px;
}

ul a
{
display: block;
padding: 5px 5px 5px 10px;
width: 125px;
color: #6633FF;
background-color: #FFFFCC;
text-decoration: none;
}

/* modify hover effect */
ul a:hover
{
text-decoration: none;
color: #FF9900;
background: lime; /*#FFFFCC*/
}

ul li
{
float: left;
position: relative;
border-bottom: 1px solid #FF6600;
}

/* hide submenu with display: none */
ul li ul
{
list-style: none;
position: absolute;
left: 0px;
top: 25px;
display: none;
width: 125px;
border-left: 1px solid #FFF;
}
/*adjust horizontal position that make submenu item will line up
with parents menu item*/
ul li ul li
{
left: -41px;
}
/*
Finally a hover style is given to the first list's "li" element
telling it to display any unordered lists it has inside it. This is the line that creates
the rollover effect.
*/
ul li:hover ul
{
display: block;
}

/* style for the biography page */
.biography
{
width: 600px;
font-size: 16px;
}

.biography h1
{
text-align: center;
margin-left: 300px;
}

.biography p
{
margin-left: 200px;
text-align: justify;
}

/* style for calendar display */
/*
#calendar_display
{
position: relative; top: 10px; left: 200px;

}
*/

.main {
width: 150px;
}

.month {
background-color: black;
font: bold 10px Verdana;
color: white;
}

.daysofweek {
background-color: gray;
font: bold 10px Verdana;
color: white;
}

.days {
font-size: 10px;
font-family: Verdana;
color:black;
background-color: #FFFF99; /* was light yellow */
padding: 2px;
}

.days #today{
font-weight: bold;
color: red;
}

web88hs