SaaS CMS has officially launched! Learn more now.

EditorPlugIn giving javascript error



I want to have a plugin attached to the XHTML editor for uploading a flash file.

After clicking the new button, it will open a popup for selecting a file from the list of files.

After selection of a file, the popup will be closed and the <OBJECT> and <EMBED> will be added to the XHTML editor with the file URL.



Class File: FlashDC

[EditorPlugIn(DisplayName = "Upload Video",
                   Usage = ToolUsage.Toolbar,
                   MenuGroup = "aHeaderMenu")]

    public class FlashDC : ToolBase, IInitializableTool
        void IInitializableTool.Initialize(HtmlEditor editor)
            string dialogURL = editor.CustomToolsURL + "HeaderPluginDialog.aspx";
            ClientSideOnClick = String.Format("MakeHeader(this,'{0}')", dialogURL);
            ClientScriptBlock = editor.GetScriptTag("HeaderMaker.js");

function MakeHeader(plugin, dialogURL)
    var url = dialogURL;
    var callbackMethod = OnMyDialogClosed;
    var dialogArguments = callbackArguments = "Stephen";
    var features = {width: 400, height: 300};
    EPi.CreateDialog(url, callbackMethod, callbackArguments, dialogArguments, features);

function OnMyDialogClosed(returnValue, callbackArguments)
    if (returnValue == null)
        alert("Decided to cancel changing name.");
        alert("New name: " + returnValue + "\n Old name: " + callbackArguments;

On clicking the plugin it is displaying a javascript error
Object expected

URL: http://localhost/sitename/admin/edit/EditPanel.aspx?SelectedEditPanelTeb=1&id=77814

I tried add few javascript but it did not worked.


Aug 03, 2009 8:30
Did you solve your problem?
Sep 30, 2009 15:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.