Re: Samples using Cute Asp

  •  06-09-2005, 4:09 PM

    Re: Samples using Cute Asp

    I followed your directions but get an error.  Here is the code I tried changing. I inserted the include as you said, then pasted the code you gave me over the bold <textarea>...<\textarea> code, but it tells me it can't find the cute editor.  I don't know. 
     
    <!-- #include file = "cute/CuteEditor_Files/include_CuteEditor.asp" -->
    <!--#include file="ConfigCalendar.inc"-->
    <!--#include file="CalDeclarations.inc"-->

    <%
    '
    'EzEvents - Version 1.1 
    '
    'Written By:  Copyright 2001
    '             George Chastain
    '             Huntsville, Alabama
    '             Website:  http://home.hiwaay.net/~georgech/
    '            
    '             You are free to use this code for any purpose but please retain the author and copyright
    '             information.  If you make any enhancements to this code, I would like to know about them.
    '             You can reach me through my website address above.
    '            
    '             Thank you.
    '
    'SOURCE FILE:   AddEvent.inc
    'DESCRIPTION:   This file supplies the code that generates a form to allow the user to enter a
    '               new event into the Event Calendar database.  From this form, the user can select
    '               to edit/delete the event.
    '              
    'Modifications:
    '
    '25 June 2001 Initial Creation

     Dim strPageTitle
     Dim strReturnPage
     Dim strReturnMonth
     Dim strReturnYear
     strReturnPage = Request.QueryString("ReturnPage")
     strReturnMonth = Request.QueryString("ReturnMonth")
     strReturnYear = Request.QueryString("ReturnYear")
     
     strPageTitle="Add Event"
     
    %>
    <!--#include file="InputValidation.inc"-->

    <!--#include file="OpenMainAppTable.inc"-->

    <% 

     ' *******************************************************************************************
     ' *******************************************************************************************
     ' Begin APP's output

     
     Response.Write("<form method=""post"" action=""ProcessAddEvent.asp?ReturnPage=" & strReturnPage & "&ReturnMonth=" & strReturnMonth & "&ReturnYear=" & strReturnYear & """>" & vbCrLf)

     Dim dtToday
     Dim dtTodayDay
     Dim dtTodayMonth
     Dim dtTodayYear
     Dim iCounter
     
     
     dtToday = Date
     dtTodayDay = Day(dtToday)
     dtTodayMonth = Month(dtToday)
     dtTodayYear = Year(dtToday)
     
     ' If today's date is in the same month and year as the return month and year passed into this
     ' page via the query strings, we will just display the current month and default the controls
     ' to today's date.  However, if the month or year passed to this page via the query strings does
     ' not match the current month, we will default the controls for the Add Month form to the first
     ' of the month that was being viewed in the "active" calendar view when the user click on "Add Event".
     
     if (StrComp(dtTodayMonth,strReturnMonth,1) <> 0) OR (StrComp(dtTodayYear,strReturnYear,1) <> 0) then
      dtTodayDay = "1"
      dtTodayMonth = strReturnMonth
      dtTodayYear = strReturnYear
     end if
     
     ' Begin FORM table
     
     Response.Write("<table border=""0"" cellpadding=""4"" cellspacing=""4"">" & vbCrLf)

     ' The user may enter an event that spans multiple days.  We will create controls that allow
     ' the user to enter a start date and an end date.  The EzEvents app is smart enough to enter
     ' only one occurrence of the event in the database but will display the event on each
     ' day in the calendar.
     
     
     
     ' Begin first row of FORM table
     
     Response.Write("<tr>" & vbCrLf)
     Response.Write("<td>" & vbCrLf)
     
     ' Begin table that will house the selection controls for dates.
     
     Response.Write("<table>" & vbCrLf)

     ' ***********************************************************************************
     ' START DATE

     Response.Write("<tr>" & vbCrLf)

     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Start Date:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     
     Response.Write("<tr>" & vbCrLf)
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Day:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventStartDay"">" & vbCrLf)
     for iCounter = 1 to 31
      if StrComp(iCounter,dtTodayDay,1) = 0 then
       Response.Write ("<option selected value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
      else
       Response.Write ("<option value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
      end if  
     next
     Response.Write("</select>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Month:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)

     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventStartMonth"">" & vbCrLf)
     for iCounter = 1 to 12
      if StrComp(iCounter,dtTodayMonth ,1) = 0 then
       Response.Write ("<option selected value=""" & iCounter & """>" & arrMonths(iCounter - 1) & "</option>" & vbCrLf)
      else
       Response.Write ("<option value=""" & iCounter & """>" & arrMonths(iCounter - 1) & "</option>" & vbCrLf)
      end if  
     next
     Response.Write("</select>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Year:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventStartYear"">" & vbCrLf)
     for iCounter = dtTodayYear to (dtTodayYear + MAXYEARSSELECTIONS)
      Response.Write("<option value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
     next
     Response.Write("</select>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("</tr>" & vbCrLf)


     Response.Write("<tr>" & vbCrLf)
     
     ' *******************************************************************************
     ' END DATE
     
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>End Date:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     
     Response.Write("<tr>" & vbCrLf)
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Day:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventEndDay"">" & vbCrLf)
     for iCounter = 1 to 31
      if StrComp(iCounter,dtTodayDay,1) = 0 then
       Response.Write ("<option selected value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
      else
       Response.Write ("<option value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
      end if  
     next
     Response.Write("</select>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)


     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Month</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventEndMonth"">" & vbCrLf)
     for iCounter = 1 to 12
      if StrComp(iCounter,dtTodayMonth ,1) = 0 then
       Response.Write ("<option selected value=""" & iCounter & """>" & arrMonths(iCounter - 1) & "</option>" & vbCrLf)
      else
       Response.Write ("<option value=""" & iCounter & """>" & arrMonths(iCounter - 1) & "</option>" & vbCrLf)
      end if  
     next
     Response.Write("</select>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<b>Year:</b>" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     
     Response.Write("<td>" & vbCrLf)
     Response.Write("<select name=""EventEndYear"">" & vbCrLf)
     for iCounter = dtTodayYear to (dtTodayYear + MAXYEARSSELECTIONS)
      Response.Write("<option value=""" & iCounter & """>" & iCounter & "</option>" & vbCrLf)
     next
     Response.Write("</select></td>" & vbCrLf)
     
     Response.Write("</td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     Response.Write("</table>" & vbCrLf)
     
     
     ' ********************************************************************************
     
     
     
     Response.Write("</td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     
     ' End first row of FORM table
     
     ' Output remaining rows of FORM table
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("  <td><b>Subject:</b></td>" & vbCrLf)
     Response.Write(" </tr>" & vbCrLf)
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("  <td><input type=""text"" name=""EventSubject"" size=""35""></td>" & vbCrLf)
     Response.Write(" </tr>" & vbCrLf)
     
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("  <td><b>Description:</b></td>" & vbCrLf)
     Response.Write(" </tr>" & vbCrLf)
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("  <td><textarea name=""EventMessage"" cols=""40"" rows=""10""></textarea></td>" & vbCrLf)
     Response.Write(" </tr>" & vbCrLf)
     
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("  <td><b>Added By:</b></td>" & vbCrLf)
     Response.Write("  <td><b>Password:</b></td>" & vbCrLf)
     Response.Write(" </tr>" & vbCrLf)
     
     Response.Write(" <tr>" & vbCrLf)
     Response.Write("<td><input type=""text"" name=""EventAddedBy"" size=""35""></td>" & vbCrLf)
     Response.Write("<td><input type=""password"" name=""Password"" size=""20""><font size=""2""> (20 Characters max)</font></td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     
     Response.Write("<tr>" & vbCrLf)
     Response.Write("<td>" & vbCrLf)
     Response.Write("<input type=""submit"" name=""btnAdd"" value=""Add Event"" onclick=""return ValInput(this.form)"">&nbsp;&nbsp;<input type=""Reset"" name=""btnReset"" value=""Clear"">" & vbCrLf)
     Response.Write("<input type=""submit"" name=""btnCancel"" value=""Return to Calendar"">" & vbCrLf)
     Response.Write("</td>" & vbCrLf)
     Response.Write("</tr>" & vbCrLf)
     
     Response.Write("</table>" & vbCrLf)
     Response.Write("<p>" & vbCrLf)
     

     
     Response.Write("</form>" & vbCrLf)

    %>

    <!--#include file="CloseMainAppTable.inc"-->
     

     

View Complete Thread