ASP Custom Button

Last post 07-01-2009, 2:26 PM by IanPhillips. 2 replies.
Sort Posts: Previous Next
  •  06-23-2009, 1:50 PM 53429

    ASP Custom Button

    I am trying to add a custom button for my classic asp product.  I keep getting a error and dont see what is wrong.
     
    The error I get is:
     
    Command 'myCmd' is Not Supported or Not Implemented
     
    Has anyone run into this and found a solution?
     
    Thanks
  •  06-24-2009, 10:27 AM 53465 in reply to 53429

    Re: ASP Custom Button

    JasonL,
     
    Please add the following code to the bottom of your page:
     
    1. <script language="JavaScript" type="text/javascript" >   
    2.                         var editor1=document.getElementById("<%= editor.ClientID %>");   
    3.                            
    4.                         function CuteEditor_OnCommand(editor,command,ui,value)   
    5.                         {   
    6.                             //handle the command by yourself   
    7.                             if(command=="MyCmd")   
    8.                             {   
    9.                              //   editor.ExecCommand("InsertTable");   
    10.                                 editor1.PasteHTML("Hello World");   
    11.                                 return true;   
    12.                             }   
    13.                         }   
    14.                     </script>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-01-2009, 2:26 PM 53685 in reply to 53465

    Re: ASP Custom Button

    I am also gettting this problem and have tried to resolve it .  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
     
    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 as RSS news feed in XML