CuteEditor and javascript

  •  09-22-2009, 1:00 PM

    CuteEditor and javascript

    I am trying to set up a page similar to the example:
     
     
    The differences are: 
    1. I want to load the data automatically via javascript.  The example does that but has a button too.
    2. I want to use the Save button to save the data.
    I have it mostly working but there are some problems that I can't seem to work around.
     
    I have changed the Normal view Save button by making the original not visible and adding a new one via the following code:
    Dim pos As Integer
    pos = Editor1.ToolControls.IndexOf("Print")
    'add this custom button into the designer toolbar
    Dim ctrl As System.Web.UI.WebControls.WebControl
    ctrl = Editor1.CreateCommandButton("Save", "save.gif", "Save changes and close window")
    ctrl.Attributes("onClick") = "CloseWindow(1);"
    Editor1.InsertToolControl(pos, "Save", ctrl)
    That all works fine but I can't figure out how to do the equivalent for the Save button in the CodeViewToolbar.
     
    The second issue I have is that window.close does not work after you open a popup like inserting an image.  This problem exists in the example too.  Anyone know why this is or if there is some other work around than catching the exception?
View Complete Thread