SAVE button not working in 6.6 version

Last post 02-13-2014, 9:30 AM by designxtrem3. 3 replies.
Sort Posts: Previous Next
  •  02-13-2014, 7:05 AM 79919

    SAVE button not working in 6.6 version

     Hello There,

     

    I have a very serious and urgent issue, one of the websites that I look after has issues with the SAVE button. The save button functionality does not work at all on the latest version of the editor, 6.7 which it shows when I check the source code of the file where the editor is installed. I downloaded version 6.6 though. 

     

    WORKING URL:

    http://bayschoolpta.org/admin/pageeditor.asp?mid=104  

    The above URL is the site running with the old editor and SAVE button is working fine and when we click FINISH everything is saved perfectly. 

     

    URL WHICH IS HAVING ISSUES 

    http://bayschoolpta.org/update/admin/pageeditor.asp?mid=104

     

    The site needs admin credentials, ADMINS please leave your email address  so i can share the credentials in the emails , so you can test and verify. urgent help is needed.

     

    thanks

     

     

  •  02-13-2014, 7:54 AM 79921 in reply to 79919

    Re: SAVE button not working in 6.6 version

    Hi,

     

    Please create an page name example.asp with the code below and test it with the new version. Does it work for you?

     

    My email is Kenneth@CuteSoft.net 

     

     

    1. <!-- #include file = "cuteeditor_files/include_CuteEditor.asp" -->   
    2. <html>      
    3.     <head>  
    4.   
    5. <meta name="robots" content="noindex,nofollow" >  
    6.         <%  
    7.             dim result  
    8.             result = ""  
    9.             If request.QueryString("postback") = "true" then  
    10.                 result = Request.Form("Editor1")  
    11.             End if  
    12.         %>  
    13.     </head>  
    14.     <body>  
    15.           
    16.         <form name="theForm" action="example.asp?postback=true" method="post">  
    17.             <p>type some content in editor and click on the save button</p>  
    18.         <%  
    19.             Dim editor  
    20.             Set editor = New CuteEditor  
    21.             editor.ID = "Editor1"  
    22.             editor.XHTMLOutput=true  
    23.             editor.Draw()  
    24.                                                   
    25.             ' Request.Form(ID) access from other page  
    26.         %>  
    27.           
    28.         <br/><br/>  
    29.                   
    30.         <textarea name="textbox1" id="Textarea1" style="font-family:Arial;height:250px;width:730px;"><%= Server.HTMLEncode(result) %></textarea>        
    31.                   
    32.                           
    33.         </form>  
    34.     </body>  
    35. </html>  

    Regards,

     

    Ken 

  •  02-13-2014, 8:32 AM 79924 in reply to 79921

    Re: SAVE button not working in 6.6 version

    Hello Ken,

     

    Thanks for the prompt reply

     

    The file is working fine with the code you sent, also when I place the file in the admin directory and setting the include file as :

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

     

    this is giving error saying, unable to include file. Can you please guide 

     

    ERROR:

    type some content in editor and click on the save button

    Failed to load the Configure file. 

     

    C:\websites\baylll\Admin

    The cute editor files are under the directory "baylll" and example.asp which is giving include error is inside "Admin " directory.

     

    Also the username and password for the site has been emailed to you.

     

    Thanks

     

     

     

     

     

     

     

  •  02-13-2014, 9:30 AM 79926 in reply to 79924

    Re: SAVE button not working in 6.6 version

    Just for reference, I am pasting the code of the pageeditor.asp file that is having issues with latest version of the editor. This might be helpful.

     

    ======================================================================

     

    <!-- #include file = "ConnStr.asp" -->

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

    <%

    If Session("sIsLogin") = 1 Then




          Set rsColoring = CreateObject("ADODB.RecordSet")

          sql = "SELECT * from CustomColoring WHERE Active = 1"

          rsColoring.Open sql, objConn


          Set rs       = Server.CreateObject("ADODB.Recordset")

          sql = "SELECT * FROM Graphics ORDER BY ID"

          rs.open sql, objConn


          Do Until rs.EOF

             MyVar = rs("location")

                Select Case MyVar

                      Case "headerimage"

                            imageHeader = rs("imagename")

                            HeaderW = rs("defaultwidth")

                            HeaderH = rs("defaultheight")

                    Case "background"

                            imageBG = rs("imagename")

          End Select

          rs.MoveNext

          Loop

          rs.MoveFirst


          if title = "" then title = GTITLE

    MenuID = request.querystring("mid")


    If MenuID <> "" then

          'response.End()

          Set rsMenu = CreateObject("ADODB.RecordSet")

          sql = "SELECT * from MenuItems WHERE MenuID = " & MenuID


          rsMenu.Open sql, objConn


          MenuItem = replace(rsMenu("MenuItem"), " ", "")

          MenuItem = replace(replace(replace(MenuItem, "'", ""),"/",""),"\","")

    else

          MenuItem = request("menuitem")

    end if




    set fso = server.CreateObject("Scripting.FileSystemObject")


    calendarFileName = server.MapPath(".") & "\..\" & MenuItem & ".html"


    if Not fso.FileExists(calendarFileName) Then

          fso.CopyFile server.MapPath(".") & "\..\default.html", server.MapPath(".") & "\..\" & MenuItem & ".html"

          calendarFileName = server.MapPath(".") & "\..\" & MenuItem & ".html"

    end if


    if request.form("function") <> "save" then

          set calendarTextFile = fso.opentextfile(calendarFileName)

          if not calendarTextFile.AtEndOfLine then

                calendarContent = calendarTextFile.readall

          end if

          calendarTextFile.close

    elseif request.form("function") = "save" then

          on error resume next

          set calendarTextFile = fso.opentextfile(calendarFileName, 2)

          calendarTextFile.write request.form("calendarcontents")

          calendarTextFile.close

          if err.number <> 0 then

                response.Write(err.description)

          else

                response.Write("Saved.")

          end if

          on error goto 0

          response.End()

    end if


    %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


    <html>


          <head>

                <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

                <meta name="generator" content="Adobe GoLive">

                <title><%=rsColoring("DefaultTitle")%></title>


                <style>

                <!-- #include file="pta.css" -->

                </style>

                <style type="text/css" media="screen"><!--

    a:link { color: white; font-size: 9pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; line-height: 11pt; text-decoration: none }

    a:visited { color: white; font-size: 9pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; line-height: 11pt; text-decoration: none }

    a:hover { color: #556984; font-size: 9pt; font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; line-height: 11pt; text-decoration: none }

    --></style>

          </head>


          <body background="../images/<%=imageBG%>" bgcolor="#ffffff" leftmargin="0" marginheight="0" marginwidth="0" topmargin="0">

                <div align="center">

                      <br>


          <script language="javascript">

          function xmlhttpPost(url, data) {

                var xmlHttpReq = false;

                var self = this;

                // Mozilla/Safari

                if (window.XMLHttpRequest) {

                      self.xmlHttpReq = new XMLHttpRequest();

                }

                // IE

                else if (window.ActiveXObject) {

                      self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");

                }

                self.xmlHttpReq.open('POST', url, true);

                self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');


                self.xmlHttpReq.onreadystatechange = function() {

                      if (self.xmlHttpReq.readyState == 4) {

                            alert(self.xmlHttpReq.responseText);

                      }

                }

                self.xmlHttpReq.send(data);

          }


          function SaveHtml()

          {

                var editor = obj_CalendarContents;

                contents = editor.getHTML();

                xmlhttpPost("<%= request.ServerVariables("SCRIPT_NAME") %>", "function=save&menuitem=<%=MenuItem%>&CalendarContents=" + escape(contents));

          }


          function redirect()

          {

          // Set the value of the href property of the location object to the address to which we want to redirect users_

                document.location.href = "menueditor.asp";

          }

          </script>


                      <table width="800" border="0" cellspacing="0" cellpadding="0" bgcolor="white" align="center>

                            <tr>

                                  <td colspan="2"><font color="#2e425b"><img src="../images/<%=imageHeader%>" alt="" width="<%=HeaderW%>" height="<%=HeaderH%> border="0"></font></td>

                            </tr>

                            <tr>

                                  <td bgcolor="#FFFFFF" colspan="2">

                                        <h1><%=rsMenu("MenuItem")%> Editor</h1><br><br>

                                        <font color=red><b><%=generalmsg%></b></font>

                                  </td>

                            </tr>

                            <tr>

                                  <td bgcolor="#FFFFFF" colspan="2">

                                        <h1><a style="color: #000000 " href="#" onclick="Popup=window.open('ptool.asp?new=1','Popup','toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=675,height=580, left=430,top=23'); return false;" target="_blank">+[Picture Utility]</a>

                                  </td>

                            </tr>

                            <tr>

                                  <td bgcolor="#FFFFFF" colspan="2">

                                        <h1><a style="color: #000000 " href="../webpage.asp?mid=<%=MenuID%>" target="_blank">+[Preview page]</a>

                                  </td>

                            </tr>

                            <tr>

                                        <td><div align="center">

                                        <%

                                        Dim editor

                                        Set editor = New CuteEditor

                                        editor.ID = "CalendarContents"

                                        editor.Text = calendarContent

                                        editor.FilesPath = "../CuteEditor_Files"

                                        editor.ImageGalleryPath = "/CuteEditor_Files/images/"

                                        editor.MaxImageSize = 500

                                        editor.ConfigurationPath = "../cute.xml"

                                        editor.Height = 600

                                        editor.Width = 584

                                        editor.AutoParseClasses = true

                                        editor.Draw()

                                        %></div>

                                  </td>

                                  </tr>

                                  <tr>

                                        <td align="center">

                                        <input type="button" name="Submit" value="Save" id="Submit" onClick="SaveHtml();" />

                                        <input type="button" name="Finish" value="Finish" id="Submit" onClick="redirect();" />

                                  </td>

                                  </tr>

                            <tr class="footer">

                                  <td colspan="2" bgcolor=<%=rsColoring("CssFooterColor")%>>

                                        <div align="center">

                                              <!-- #INCLUDE file="footer.asp" -->

                                        </div>

                                  </td>

                            </tr>


          </table>

          </div>

          </body>


    </html>

    <% else

          response.Redirect("default.asp?needlogin=1")

    End if %> 

    ====================================================================== 

View as RSS news feed in XML