Re: Change event

  •  08-24-2012, 7:54 AM

    Re: Change event

    Hi cabolet,

     

    Please try the example page below, it shows you how to check the editor content has been changed.

      

    1. <!-- #include file = "cuteeditor_files/include_CuteEditor.asp" -->   
    2. <html>      
    3.     <head>  
    4.         <title>ASP Editor Demo</title>  
    5.       
    6.     </head>  
    7.     <body>  
    8.           
    9.         <form name="theForm">  
    10.         <%  
    11.             Dim editor  
    12.             Set editor = New CuteEditor  
    13.             editor.Text="some content"  
    14.             editor.ID = "Editor1"  
    15.             editor.Draw()  
    16.         %>  
    17.         <input type="button" value="check is dirty" onclick="checkIsDirty()" />     
    18.         </form>  
    19.     </body>  
    20. </html>  
    21. <script>  
    22. var editor1 = document.getElementById('CE_Editor1_ID');  
    23. function checkIsDirty()  
    24. {  
    25.     if(editor1.IsDirty())  
    26.     {  
    27.         alert("is dirty");  
    28.     }  
    29. }  
    30. function CuteEditor_OnChange(editor)  
    31. {   
    32.   checkIsDirty();  
    33. }  
    34. </script>  

    Regards,

     

    Ken 

View Complete Thread