EditorPlugIn giving javascript error

Vote:
 

TASK:

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.

 

SCENARIO:

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");
}
}

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.");
    }
    else
    {
        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.

 

#31483
Aug 03, 2009 8:30
Vote:
 
Did you solve your problem?
#33051
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.