Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Response object error
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Response object error

 Post Reply Post Reply
Author
r0ck1t View Drop Down
Newbie
Newbie


Joined: 08 November 2003
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote r0ck1t Quote  Post ReplyReply Direct Link To This Post Topic: Response object error
    Posted: 09 November 2003 at 2:37am

Hi, I have got a modified copy of ASP101's calendar script which I have modified further which now spits out this error

Response object error 'ASP 0185 : 80020003'

Missing Default Property

/default.asp, line 0

A default property was not found for the object.

The code is below:

Class gyCalendar
 Dim SelectedDate

 Private tmpDate

 Private Sub Class_Initialize()
  Call ASP101Calendar()
 End Sub

 Public Property Get SelectedtmDate()
  SelectedtmDate = FormatDateTime(tmpDate, 1)
 End Property

 Private Property Let SelectedtmDate(byVal dtmDate)
  tmpDate = dtmDate
 End Property

 Private Function GetDaysInMonth(iMonth, iYear)
  Select Case iMonth
   Case 1, 3, 5, 7, 8, 10, 12
    GetDaysInMonth = 31
   Case 4, 6, 9, 11
    GetDaysInMonth = 30
   Case 2
    If IsDate("February 29, " & iYear) Then
     GetDaysInMonth = 29
    Else
     GetDaysInMonth = 28
    End If
  End Select
 End Function

 Private Function GetWeekdayMonthStartsOn(dAnyDayInTheMonth)
  Dim dTemp

  dTemp = DateAdd("d", _
   -(Day(dAnyDayInTheMonth) - 1), dAnyDayInTheMonth)
  GetWeekdayMonthStartsOn = WeekDay(dTemp)
 End Function

 Private Function SubtractOneMonth(dtmDate)
  SubtractOneMonth = DateAdd("m", -1, dtmDate)
 End Function

 Private Function AddOneMonth(dtmDate)
  AddOneMonth = DateAdd("m", 1, dtmDate)
 End Function

 Private Function ASP101Calendar()
  Dim dtmDate     ' Date we're displaying calendar for
  Dim intDIM      ' Days In Month
  Dim intDOW      ' Day Of Week that month starts on
  Dim intCurrent  ' Variable we use to hold current day of month as we write table
  Dim intPosition ' Variable we use to hold current position in table
  'my new variables
  Dim intMyNewDate    ' holds new xx/xx/xx date format from the query string if we use the form
  Dim intNewFullDate  ' str that holds entire old date query string
  Dim intFinalNewDate ' proper date format for each day link on the calendar
  Dim strTemp

  strTemp = ""

  If IsDate(Request.QueryString("Date")) Then
   dtmDate = CDate(Request.QueryString("Date"))
  Else
   intMyNewDate = Request.QueryString("Month") & "/" & _
   Request.QueryString("Day") & "/" & _
   Request.QueryString("Year")
   If IsDate(intMyNewDate) Then
    dtmDate = CDate(intMyNewDate)
   Else
    dtmDate = Date()
   End If
  End If
  SelectedDate = dtmDate

  intDIM = GetDaysInMonth(Month(dtmDate), Year(dtmDate))
  intDOW = GetWeekdayMonthStartsOn(dtmDate)

  Response.Write("<table class=""table""><tr><td><table class=""contenttable"">")
  Response.Write("<tr class=""headertr""><td>calendar</td></tr&a mp;g t;<tr><td>")
  Response.Write("<table><tr><td bgcolor=""#60786B"" align=""center"" colspan=7>")
  Response.Write("<table width=""100%"" border=0 cellspacing=0 cellpadding=0><tr>")
  Response.Write("<td align=""right""><a class=""smLink"" href=""
events_default.asp?Date=" & SubtractOneMonth(dtmDate) & """>&lt;&lt;</font></a></td>")
  Response.Write("<td align=""center""><span class=""lgText"">" & MonthName(Month(dtmDate)) & "  " & Year(dtmDate) & "</span></td>")
  Response.Write("<td align=""left""><a class=""smLink"" href=""
events_default.asp?Date=" & AddOneMonth(dtmDate) & """>&gt;&gt;</a></td>")
  Response.Write("</tr></table></td ></tr><tr>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Sun</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Mon</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Tue</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Wed</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Thu</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Fri</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")
  Response.Write("<td align=""center"" bgcolor=""#999999""><b>Sat</b><br><i mg src=""./images/spacer.gif"" width=""30"" height=""1"" border=""0""></td>")

  If intDOW <> 1 Then
   Response.Write("<tr bgcolor=""#EEEEEE"">")
   intPosition = 1
   Do While intPosition < intDOW
    Response.Write("<td bgcolor=""#EEEEEE"">&nbsp;</td>")
    intPosition = intPosition + 1
   Loop
  End If

  intCurrent = 1
  intPosition = intDOW
  Do While intCurrent <= intDIM

   If intPosition = 1 Then
    Response.Write("<tr>")
   End If

   If intCurrent = Day(dtmDate) Then
    Response.Write("<td bgcolor=""#555555""><b>" & intCurrent & "</b><br><br></td>")
   Else
    intNewFullDate = CStr(Month(dtmDate) & "/" & intCurrent & "/" & Year(dtmDate))
    intFinalNewDate = FormatDateTime(intNewFullDate, 2)
    Response.Write("<td bgcolor=""#EEEEEE""><a href=""

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.