J
jp2code
I'm trying to display a weekly calendar with the month and year on top and
the current date in an alternate color, but nothing prints out on my test
page when viewed in IE7.
Is there something fundamentally wrong with my code, is it my browser, or
does this not show up when displayed on my PC?
Here is all of the code (nice and small):
<%@ Language="VBSCRIPT"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<%
Dim i As Integer
Response.Write("<table><tr><td class=""mmyy"">start1" & Month(Date()) & "
" & Year(Date()) & "end1</td></tr><tr>")
For i = 1 To 7
Response.Write("<td class=""" & ((i=WeekDay(Date())?"day":"reg") & """>"
& Day(Date()) & "</td>")
Next i
Response.Write("</tr></table>")
%>
<html>
<head>
<title>Weekly Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
td { background-color:Black; height:24px; width:24px; font-size:
12pt; color:Red; }
td.mmyy { background-color:Silver; height:24px; width:24px; }
td.day { background-color:Yellow; height:24px; width:24px; }
td.reg { color:White; }
</style>
</head>
<body>
<table>
<tr><td class="mmyy" colspan="7">start2<% Response.Write(Month(Date()) &
" " & Year(Date())) %>end2</td></tr>
<tr>
<%
Dim i As Integer
For i = 1 To 7
Response.Write("<td class=""")
If (i = WeekDay(Date())) Then
Response.Write("day")
Else
Response.Write("reg")
End If
Response.Write(""">" & Day(Date()) & "</td>")
Next
%>
</tr>
</table>
<hr />
<table>
<tr><td class="mmyy" colspan="7">start3<% Response.Write(Month(Date()) &
" " & Year(Date())) %>end3</td></tr>
<tr>
<%
Dim i As Integer
For i = 1 To 7
Response.Write("<td class=""" & ((i=WeekDay(Date())?"day":"reg") &
""">" & Day(Date()) & "</td>")
Next
%>
</tr>
</table>
</body>
</html>
the current date in an alternate color, but nothing prints out on my test
page when viewed in IE7.
Is there something fundamentally wrong with my code, is it my browser, or
does this not show up when displayed on my PC?
Here is all of the code (nice and small):
<%@ Language="VBSCRIPT"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<%
Dim i As Integer
Response.Write("<table><tr><td class=""mmyy"">start1" & Month(Date()) & "
" & Year(Date()) & "end1</td></tr><tr>")
For i = 1 To 7
Response.Write("<td class=""" & ((i=WeekDay(Date())?"day":"reg") & """>"
& Day(Date()) & "</td>")
Next i
Response.Write("</tr></table>")
%>
<html>
<head>
<title>Weekly Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
td { background-color:Black; height:24px; width:24px; font-size:
12pt; color:Red; }
td.mmyy { background-color:Silver; height:24px; width:24px; }
td.day { background-color:Yellow; height:24px; width:24px; }
td.reg { color:White; }
</style>
</head>
<body>
<table>
<tr><td class="mmyy" colspan="7">start2<% Response.Write(Month(Date()) &
" " & Year(Date())) %>end2</td></tr>
<tr>
<%
Dim i As Integer
For i = 1 To 7
Response.Write("<td class=""")
If (i = WeekDay(Date())) Then
Response.Write("day")
Else
Response.Write("reg")
End If
Response.Write(""">" & Day(Date()) & "</td>")
Next
%>
</tr>
</table>
<hr />
<table>
<tr><td class="mmyy" colspan="7">start3<% Response.Write(Month(Date()) &
" " & Year(Date())) %>end3</td></tr>
<tr>
<%
Dim i As Integer
For i = 1 To 7
Response.Write("<td class=""" & ((i=WeekDay(Date())?"day":"reg") &
""">" & Day(Date()) & "</td>")
Next
%>
</tr>
</table>
</body>
</html>