Samples using Cute Asp

Last post 06-12-2005, 11:16 AM by joyb. 6 replies.
Sort Posts: Previous Next
  •  06-07-2005, 10:53 AM 7305

    Samples using Cute Asp

    Hi, 

    I´m novice in Cute Asp and i would like to get samples of using this product. Where can i find it ??
  •  06-09-2005, 12:44 AM 7374 in reply to 7305

    Re: Samples using Cute Asp

    I'm right there with you.  Are there any further directions for those of us who do not have a clue?  I bought this program because I have an ASP calendar and I want to change my message box to this type of message box.  Anyone know a step by step process that could help me do that/
  •  06-09-2005, 4:31 AM 7379 in reply to 7374

    Re: Samples using Cute Asp

    There are a number of examples on this site - see the Online Demos here: http://cutesoft.net/asp/EnableAll.asp
     
    Here's a simple step-by-step:
     
    1. Upload the CuteEditor files to your server.
     
    2. Create a directory called Uploads at the root of your web site on the server.
     
    3. Now in the page where you want to add the editor, put as the first line: 

    <!-- #include file = "CuteEditor_Files/include_CuteEditor.asp" --

    You will probably need to modify the path, eg to "Cute/CuteEditor_Files/include_CuteEditor.asp"
     
    4. Replace the <textarea> .... <\textarea> tag on your existing form with the code:
     
    <%
    Dim editor
    Set editor = New CuteEditor
    editor.ID = "textbody"
    editor.Text = "..."
    editor.FilesPath = "/ASP/CuteEditor_Files"
    editor.ImageGalleryPath = "/Uploads"
    editor.MaxImageSize = 50
    editor.AutoConfigure = "EnableAll"
    editor.Draw()
    %>

    Again, you will probably need to modify the paths. And that's it.  

    So to get text from your database into the editor, change the above to say for example:

    editor.Text = myRs.Fields("textbody").value

    Then you update the database just like you did with the textarea, using the editor.ID instead of the TextArea name, and you can just refer to it like before with response.form("textbody").
     
  •  06-09-2005, 4:09 PM 7404 in reply to 7379

    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"-->
     

     

  •  06-09-2005, 4:12 PM 7406 in reply to 7404

    Re: Samples using Cute Asp

    There is also this file called AddEvent.asp.  Do I need to alter it?


    <%@ LANGUAGE=VBSCRIPT %>

    <%Option Explicit%>

    <html>

    <head>

    <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">

    <meta NAME="GENERATOR" CONTENT="Microsoft FrontPage 6.0">

    <meta NAME="ProgId" CONTENT="FrontPage.Editor.Document">

    <title>Add Calendar Event</title>

    </head>

     

    <body BGCOLOR="#FFFFFF" TOPMARGIN="0" LEFTMARGIN="0">

     

     

    <!--#include file="Includes\AddEvent.inc"-->

     

    </body>

  •  06-10-2005, 5:50 AM 7451 in reply to 7404

    Re: Samples using Cute Asp

     joyb wrote:
    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> code, but it tells me it can't find the cute editor.  I don't know. 
     
    Yikes, this is getting a bit complex, this page actually generates the html code for the form - that's what all the response.write statements do.

    So you need to be very careful when you replace the ... <\textarea> code, because you need to replace the double-quotes by two times double-quotes, if you see what I mean.

    You also need to be sure the Editor.ID is set to "EventMessage" (the name used for the TextArea).

    Also check that the paths mentioned in Editor.FilesPath are correct - for you it may be "/Cute/CuteEditor_Files" or try just "Cute/CuteEditor_Files"
  •  06-12-2005, 11:16 AM 7510 in reply to 7451

    Re: Samples using Cute Asp

    Thanks...but I give up.
     
     
    Their message area takes html, so I am just using Cute to generate the html and pasting it in there.  I also contacted the
     
    author of the other calendar program and shared my needs with him.  Maybe he will have time to incorporate the
     
    cute editor for me.
     
    Thanks for all your help.
View as RSS news feed in XML