Change event

Last post 08-24-2012, 7:54 AM by Kenneth. 1 replies.
Sort Posts: Previous Next
  •  08-22-2012, 11:59 AM 74469

    Change event

     How can I trigger the change event in cuteeditor to set the write dirty flag?

    a ny help is welcome

    Filed under:
  •  08-24-2012, 7:54 AM 74479 in reply to 74469

    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 as RSS news feed in XML