showing confirmation alert message when tinymce while moving more page to another page
<p>I have few web user controls in that i am using tinymce extender editor.. and i am calling all the control in one aspx file on different different btn click.</p>

<p>I want, when i am edit mode and i am changing some text in that editor and without saving it if am leave that page its must ask and show the confirmation alert msg do you want to save this text.</p>

<p>how to do it.</p>

<p>on ascx file</p>

<p>Diagnosis:
                    </p>

<pre><code>                    &lt;asp:TextBox ID="txbDiag" TextMode="MultiLine" runat="server" Width="100%" Height="100px"&gt;&lt;/asp:TextBox&gt;
                    &lt;acr3s:tinymceextender runat="server" ID="TinyMceExtender4" TargetControlID="txbDiag" Theme="Full"&gt;
                    &lt;/acr3s:tinymceextender&gt;                        
                &lt;/td&gt;
</code></pre>

<p>extender which i am calling is</p>

<p>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.ComponentModel;
using System.Web.UI.WebControls;
using System.Globalization;</p>

<p>[assembly: WebResource(NewCaseWizardBAL.TinyMceExtender.SupportScript, "text/javascript")]</p>

<p>namespace NewCaseWizardBAL
{
    [TargetControlType(typeof(TextBox))]
    public class TinyMceExtender : ExtenderControl
    {</p>

<pre><code>    internal const string SupportScript = "NewCaseWizardBAL.TinyMceSupport.js";

    private TinyMceTheme _theme = TinyMceTheme.Limited;

    private string GetTheme()
    {
        switch (Theme)
        {
            case TinyMceTheme.Limited:
                return "limited";
            case TinyMceTheme.Full:
                return "special";
            case TinyMceTheme.FullWithImage:
                return "specialWithImage";
            default:
                return "";
        }
    }
    [DefaultValue(TinyMceTheme.Limited)]
    public TinyMceTheme Theme
    {
        get { return _theme; }
        set { _theme = value; }
    }
    protected override IEnumerable&lt;ScriptDescriptor&gt; GetScriptDescriptors(Control targetControl)
    {
        return null;
    }

    protected override IEnumerable&lt;ScriptReference&gt; GetScriptReferences()
    {
        return null;
    }


    protected override void OnPreRender(System.EventArgs e)
    {
        base.OnPreRender(e);
        Control targetControl = FindControl(TargetControlID);            
        ScriptManager.RegisterClientScriptInclude(Page, typeof(TinyMceExtender), "include_tiny_mce", ResolveClientUrl("~/Scripts/tiny_mce/tiny_mce.js"));
        ScriptManager.RegisterClientScriptResource(Page, typeof(TinyMceExtender), SupportScript);
        ScriptManager.RegisterClientScriptBlock(this, typeof(TinyMceExtender), "init" + targetControl.ClientID, string.Format(CultureInfo.InvariantCulture, "initTinyMCE ('{0}', '{1}');", targetControl.ClientID, GetTheme()), true);

    }

}

public enum TinyMceTheme
{
    Limited,
    Full,
    FullWithImage
}
</code></pre>

<p>}</p>

<p>i can't write any onclient event because i am calling masking script onclient click</p>

<p>so how to do it with the help of any jquery or java script</p>

<p>i am using autosave plugin also but its not showing any alert msg</p>

<p>do i need to change something in tiny_mce.js</p>

<p>please help me to show confirmation alert box to ask "Do you want to save you changes"</p>
