Custom button error

  •  07-02-2009, 8:30 AM

    Custom button error

    I am also gettting this problem referred to in the previous post and have tried to resolve it using the mentioned fix.  My code is below.
    What I want it to do is to open a new popup window with a page in it called cms_uploader.asp
     
    I am getting a message saying Command 'myCmd' is Not Supported or Not Implemented even though it looks like i have the code in place
     
    Any ideas..????
     
     
     <%      'this editor is used in all of the edit content pages.  The backups editor is not this one
          
        Dim editor,MessageField
        MessageField  = (contentData) 'captures the  content from the  recordset on the page this include file is loaded into
        Set editor = New CuteEditor
        'editor.ImageGalleryPath = "localhost/cms/image"
        editor.Height = 450
        editor.ThemeType="Office2003"
        
        editor.UseRelativeLinks=false
        editor.RemoveServerNamesFromUrl = true
        editor.ID = "fckeditor1"
        editor.Text = MessageField
        'editor.TemplateGalleryPath = "/cms/site-templates"
        editor.BreakElement = "p"
        editor.FilesPath = "CuteEditor_Files"
        Editor.DisableItemList = "InsertFieldSet, Images, new,preview,save, help, CssStyle,FontName,FontSize, InsertForm ,InsertTextBox,InsertInputText,InsertInputPassword,InsertInputhidden,InsertListBox,InsertDropDown,InsertRadioBox,InsertCheckBox,InsertInputImage,InsertInputSubmit,InsertInputReset,InsertInputButton"
        'Editor.FullPage= "True"
        
        editor.CustomAddons = "<img title=""Using oncommand"" class=""CuteEditorButton"" onmouseover=""CuteEditor_ButtonCommandOver(this)"" onmouseout=""CuteEditor_ButtonCommandOut(this)"" onmousedown=""CuteEditor_ButtonCommandDown(this)"" onmouseup=""CuteEditor_ButtonCommandUp(this)"" ondragstart=""CuteEditor_CancelEvent()"" Command=""MyCmd"" src=""CuteEditor_Files/images/contact.gif"" />"
        'determines what css is used in the editor panel
        
        editor.EditorWysiwygModeCss = "css-content.css,css-structural.css"
        
        'the next line determines what tools appear in the toolbar
        'editor.TemplateItemList="G_start,Bold,Italic,Underline,Separator,JustifyLeft,JustifyCenter,JustifyRight,G_end"
        
        editor.Draw()
       
        ' Request.Form(ID) access from other page
    %> 
        
    <script language="JavaScript" type="text/javascript" >  
                            var editor1=document.getElementById("<%= editor.ClientID %>");  
                              
                            function CuteEditor_OnCommand(editor,command,ui,value)  
                            {  
                                //handle the command by yourself  
                                if(command=="MyCmd")  
                                {  
                                 //   editor.ExecCommand("InsertTable");  
                                    editor1.PasteHTML("Hello World");  
                                    return true;  
                                }  
                            }  
                        </script> 
     

    Ian Phillips
    Development and Project Management
View Complete Thread