Re: can't deal wit it

  •  01-13-2005, 6:02 AM

    Re: can't deal wit it

    surprisly.

    i change like this:

     
     article = rs("article")

       editor.ID = "Editor1" 'Set the ID of this editor class
       editor.Text = article 'Set the initial HTML value of editor control
       editor.FilesPath = "../CuteEditor/CuteEditor_Files"
       editor.ImageGalleryPath = "/Uploads"
    and its done. !
    i can update an existing article. 
     
    But
    i still have a problem with inserting a new article
    thats my code:

    <%
       Dim editor
       Set editor = New CuteEditor  'Create a new editor class
       editor.ID = "Editor1" 'Set the ID of this editor class
       editor.Text = article 'Set the initial HTML value of editor control
       editor.FilesPath = "../CuteEditor/CuteEditor_Files"
       editor.ImageGalleryPath = "/Uploads"
       editor.MaxImageSize = 50
       editor.AutoConfigure = "enableall"
       editor.DisableItemList = "Save"
       editor.Width = 440
       editor.Height = 200                                                                                                     
       editor.Draw()
    %>       


    <%
    dim articleA
    article=Request.Form("Editor1_HTMLContent")
     
     If Request("addArticle") <> "" Then
      Set con = Server.CreateObject("ADODB.connection")
      con.Open "Provider=Microsoft.Jet.OleDB.4.0; data source=" & Server.MapPath("../mainDB/admin.mdb")
      Set rs = Server.CreateObject("ADODB.recordset")
      rs.Open "articles",con,3,3
      rs.AddNew
       rs("title") = setData(Request("aTitle"))
       rs("article") = article
      rs.Update
      rs.Close
     End If
    %>
    </BODY>
    </HTML>
View Complete Thread