Re: DNN Javascript event for save button

  •  11-13-2006, 3:27 PM

    Re: DNN Javascript event for save button

    Using this code-snip in the TextEditor.ascx but fails to connect it to the event...
     
    <script language="JavaScript" type="text/javascript" >
     function HandleEditorCommand(editor)
     {
      if(event.command.toLowerCase()=='help')
      {
       alert("You click the help button!");
       window.open("http://www.asp.net/");
       
       //notice the CuteEditor ignore this .
       event.returnValue=false;
      }
      if(event.command=='PostBack'&&event.commandvalue=='Save')
      {
       alert("The Save Command Captured by the JavaScript function : HandleEditorCommand");
        
       //notice the CuteEditor ignore this .
       event.returnValue=false;
      }
     }
    </script>

    Regards, Andreas Ek
View Complete Thread