What I am trying to do is when the user clicks on the date th
month/date/year appears in the text box like this: 1/15/2004. Ho
would I do this. This is not home work, but it is for a client o
mine.
Calendar Code:
<html>
<head>
<style>
.cw {width:20px}
.jan{
position:absolute;
font-family:comic sans ms;
width: 147px;
height: 21px;
text-align:center;
left: -1px;
top: 4px;
}
.date{
position:absolute;
font-family:comic sans ms;
left: 1px;
top: 38px;
width: 143px;
height: 10px;
}
.close{
text-align:center;
}
</style>
<script>
function a() {
document.getElementById('show_cal').style.visibili ty = '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: 52px; left:162px
border: solid; visibility:hidden; width: 151px; height: 198px;">
<br><br>
<table class="jan" border="1">
<tr>
<td>January</td>
</tr>
</table>
<table width="145" border="0" class="date">
<tr>
<td>s</td>
<td>m</td>
<td>t</td>
<td>w</td>
<td>r</td>
<td>f</td>
<td>s</td>
</tr>
</table>
<br><br>
<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>
<a class="close" href="#
onclick="parentNode.style.visibility='hidden';"><c enter>Close</center></a>
</div>
</body>
</html
newtd
-----------------------------------------------------------------------
Posted via
http://www.forum4designers.co
-----------------------------------------------------------------------
View this thread:
http://www.forum4designers.com/message33119.htm