Re: problem in IsDirty

  •  12-06-2010, 11:48 AM

    Re: problem in IsDirty

    Dear wolf11th,
     
    The following example is vb code, please refer to it:

    <%@ Page Language="vb"%>
    <%@ Register TagPrefix="CE" Namespace="CuteEditor" Assembly="CuteEditor" %>
    <html>
        <head>
      <title>ASP and ASP.NET WYSIWYG Editor - Default Configuration </title>
      <link rel="stylesheet" href="../example.css" type="text/css" />
     </head>
     <body>
            <form id="Form1" runat="server">   
         
          <CE:Editor id="Editor1" runat="server" ></CE:Editor><br />
           <input type="button" value="check is dirty" onclick="checkIsDirty()" /> 
                               </form>
     </body>
    </html>

    <script runat="server">
     Public Sub Page_Load(sender As object, e As System.EventArgs)       
             If Not Page.IsPostBack Then
       Editor1.Text = "Type Here"
       End If
     End Sub

    </script>

    <script type="text/javascript">
        var editor1 = document.getElementById("<%= editor1.ClientID %>");
        function checkIsDirty() {
            if (editor1.IsDirty()) {
                //set_updated()  
                alert("is dirty");
            }
        }
        function CuteEditor_OnChange(editor) {
            checkIsDirty();
        }  
    </script>
    Thank you for asking
    Eric@cutesoft.net  
View Complete Thread