Toolbar Button Functionality - Adding Javascript

Last post 10-01-2008, 1:13 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  10-01-2008, 9:59 AM 44473

    Toolbar Button Functionality - Adding Javascript

    Hey,
     
    I am trying to add some javascript to the save button of the editor.  Is it possible to do this and if so is there documentation somewhere on how?  I asume I can't change the code directly but there must be some class that handles the button and it's features.
     
    Thanks in Advance
     
     
     EDITED
     

    I found the documentation:

    This event is invoked when the command button is clicked.
    Example:

     

    function CuteEditor_OnCommand(editor,command,ui,value)
     {
        //handle the command by yourself
       if(command=="InsertEmotion")
       {
          var answer = confirm("Click OK to stop this command.")
          if (answer){
             return true;
          }
          else{
             return false;
          }
       }
    }

    But it doesn't seem to work, do I need to tell the editor to start looking at this javascript function?

  •  10-01-2008, 1:13 PM 44484 in reply to 44473

    Re: Toolbar Button Functionality - Adding Javascript

    Please check the following example:
     
    How to capture the save button click event?

    How to capture the SAVE button click event?( C# | VB )

    This example demonstrates how to capture the SAVE button click event by using client-side code and server-side code.

     
    The source code of this example can be found in the download package.

    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

View as RSS news feed in XML