Load a template using an external event

  •  03-15-2007, 7:03 PM

    Load a template using an external event

    I'm sure I'm not the first, but I couldn't find anything like it in the forums...
     
    I'm trying to load a content template from a pop-up screen
     
    The page with the editor looks like this - the CuteEditor is in a form called "EDITFORM":
     
    ...
       Dim editor
       Set editor = New CuteEditor
         
       editor.ID = "Description"
       editor.Text = content
       editor.FilesPath = "../CuteEditor_Files"
       editor.AutoConfigure = "Enersold"
       editor.Width = 600
       editor.EditorWysiwygModeCss = "css/CuteEditor.css"
       'editor.LoadHTML("APTemplates/amine.htm") --- (this line works, but I'm trying to replace it)
       editor.Draw()
    ...
     
     
    This is some of the code from the popup window
     
    ...
        Response.Write "    var sTLDesc = ""APTemplates/amine.htm"" " & vbCrLf 
        Response.Write "    opener.document.EDITFORM.TLCatDesc.value = sTLDesc;" & vbCrLf '--- this fills a textbox properly
        Response.Write "    opener.document.EDITFORM.Description.LoadHTML(sTLDesc);" & vbCrLf
        Response.Write "    window.close();" & vbCrLf
    ...
     
    The template doesn't get loaded, and the pop-up window won't close when the LoadHTML line is in there.
    When that line is commented out, the window closes and the expected filepath sTLDesc appears in my test textbox.
     
    And my head is getting more and more sore as I look at it.
     
    It seems sooooo close.
     
    thanks
     
    Doug
     

     
     

     
View Complete Thread