newtda
01-14-2004, 09:37 AM
Here is my code for my calendar. Now how would put a close link at the bottom of the calendar, so that when someone wants to get out of the calendar then can hit the close link. I tryed to search it but couldnt come up with anything.
Calendar Code:\
<html>
<head>
<style>
.cw {width:20px}
</style>
<script>
function a() {
document.getElementById('show_cal').style.visibility = 'visible';
}
</script>
</head>
<body>
<input type="text" name="txtDate">
<input name="button" type="button" onClick="a()" value="Calendar">
<div id ="show_cal" style="position: absolute; top: 51px; left:165px; border: solid; visibility:hidden; width: 151px; height: 26px;">
<div class="close">Cancel</div>
<script>
ms = 5;
dm = 31;
d = 1;
for (i=1; i<=42;i++){
if ( i >= ms && d <=dm)
{
html ="<input type='text' class='cw' value=" + d + ">";
d++;
}
else
{
html = "<input type='text' class='cw'>";
}
document.write(html);
if (i % 7 == 0){
document.write("<br>");
}
}
</script>
</div>
</body>
</html>
Calendar Code:\
<html>
<head>
<style>
.cw {width:20px}
</style>
<script>
function a() {
document.getElementById('show_cal').style.visibility = 'visible';
}
</script>
</head>
<body>
<input type="text" name="txtDate">
<input name="button" type="button" onClick="a()" value="Calendar">
<div id ="show_cal" style="position: absolute; top: 51px; left:165px; border: solid; visibility:hidden; width: 151px; height: 26px;">
<div class="close">Cancel</div>
<script>
ms = 5;
dm = 31;
d = 1;
for (i=1; i<=42;i++){
if ( i >= ms && d <=dm)
{
html ="<input type='text' class='cw' value=" + d + ">";
d++;
}
else
{
html = "<input type='text' class='cw'>";
}
document.write(html);
if (i % 7 == 0){
document.write("<br>");
}
}
</script>
</div>
</body>
</html>