Editing Static/HTML content problem - urgent!!

Last post 01-06-2006, 6:26 AM by rcroeder. 2 replies.
Sort Posts: Previous Next
  •  01-04-2006, 7:14 AM 14396

    Editing Static/HTML content problem - urgent!!

    Ive recently bought Cute Ediotr for ASP and am trying to edit a static HTML page and then save it. However so far I have been unsucceful.
     
    I am using the sample file Edithtml.asp. However when i make the changes to the HTML and then click the save button I get the error message:

    Permission denied
    /testsite/editor/include_CuteEditor.asp, line 953

    Now I know the folder does have permissions to write text files as the following code works and creates an HTML file:

    Dim Stuff, myFSO, WriteStuff
    Stuff = "<html>Here is some stuff to write in the file.</html>"
    Set myFSO = CreateObject("Scripting.FileSystemObject")
    Set WriteStuff = myFSO.OpenTextFile("C:\testsite\test.html", 2, true)
    WriteStuff.WriteLine(Stuff)
    WriteStuff.Close
    SET WriteStuff = NOTHING
    SET myFSO = NOTHING

    ----------------------------------------------------------------------------------------------------------

    To try to troubleshoot this problem i modified the code after ELSE in Edithtml.asp as follows:

    Else

    Dim Stuff, myFSO, WriteStuff
    Set myFSO = CreateObject("Scripting.FileSystemObject")
    Set WriteStuff = myFSO.OpenTextFile("C:\testsite\document2.html", 2, true)
    WriteStuff.WriteLine(Editor.Text)
    WriteStuff.Close
    SET WriteStuff = NOTHING
    SET myFSO = NOTHING

    End If

    The above code DOES work and writes out the html into document2.html . However when  i change the document name to the doument name that was loaded originally using editor.LoadHTML("document.html") then I the 'permission denied' error. That is if i use
    Set WriteStuff = myFSO.OpenTextFile("C:\testsite\document.html", 2, true) I get the error!!


    So it seems like maybe the stream or whatever is still open to doument.html and therefore does not allow me to save back to document.html or something along those lines!!

    Please help..as need to solve this ASAP .thanks in advance for any help!!!

    -------------------------------------------

    Was just going through it some more. Suppose i leave the edithtml.asp as it is. Now if i go to the SaveFile function in Include_CuteEditor.asp and hardcode FilePath as follows:

    //THIS CAUSES THAT Permission error
    FilePath = "C:\testsite\document.html" 


    //THIS WORKS FINE
    FilePath = "C:\testsite\document2.html" 













     
     
  •  01-04-2006, 12:13 PM 14406 in reply to 14396

    Re: Editing Static/HTML content problem - urgent!!

    Well ive uploaded it to my server and seems to be working fine online but not locally. So not sooo urgent. However if you know offhand whats casuing this problem locally it woul be great...
  •  01-06-2006, 6:26 AM 14490 in reply to 14396

    Re: Editing Static/HTML content problem - urgent!!

    Which Version of Cute Edit? You should alway state what version.
     
    RC
View as RSS news feed in XML