I'm using the HtmlEditor from the Ajax Toolkit on a webform.
If a user clicks Cancel, all the fields on the form are reset to the previous value. Apart from the content in the HtmlEditor.
How can I achieve this?
Comments: The code for the editor is as follows (partial for readabiltiy): <asp:LinkButton ID="lnkDummy" runat="server"></asp:LinkButton> <asp:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mpeHTMLEditorVoor" PopupControlID="pnlHTMLEditorVoor" TargetControlID="lnkDummy" runat="server"> </asp:ModalPopupExtender> <asp:Panel ID="pnlHTMLEditorVoor" CssClass="Popup" runat="server"> <asp:TextBox id="txtVoorlooptekst" style="width:100%;" Rows="20" TextMode="MultiLine" runat="server"></asp:TextBox> <asp:HtmlEditorExtender ID="htmlEditor1" TargetControlID="txtVoorlooptekst" runat="server"> asp:HtmlEditorExtender> <br /> <input type="button" id="cmdAnnulerenO" value="Annuleren" onclick="$find('mpeHTMLEditorVoor').hide();" /> <input type="button" id="cmdSluitenO" value="Sluiten" onclick="BewerkenTekst($('#txtVoorlooptekst').val(), 'divVoorlooptekst');" /> The Javascript on canceling is: document.forms['form1'].reset(); That clears the text in all the other textboxes, but not for the editor. I've tried to set the value of txtVoorlooptekst to "" and other simalar approaches, but with no result.
If a user clicks Cancel, all the fields on the form are reset to the previous value. Apart from the content in the HtmlEditor.
How can I achieve this?
Comments: The code for the editor is as follows (partial for readabiltiy): <asp:LinkButton ID="lnkDummy" runat="server"></asp:LinkButton> <asp:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mpeHTMLEditorVoor" PopupControlID="pnlHTMLEditorVoor" TargetControlID="lnkDummy" runat="server"> </asp:ModalPopupExtender> <asp:Panel ID="pnlHTMLEditorVoor" CssClass="Popup" runat="server"> <asp:TextBox id="txtVoorlooptekst" style="width:100%;" Rows="20" TextMode="MultiLine" runat="server"></asp:TextBox> <asp:HtmlEditorExtender ID="htmlEditor1" TargetControlID="txtVoorlooptekst" runat="server"> asp:HtmlEditorExtender> <br /> <input type="button" id="cmdAnnulerenO" value="Annuleren" onclick="$find('mpeHTMLEditorVoor').hide();" /> <input type="button" id="cmdSluitenO" value="Sluiten" onclick="BewerkenTekst($('#txtVoorlooptekst').val(), 'divVoorlooptekst');" /> The Javascript on canceling is: document.forms['form1'].reset(); That clears the text in all the other textboxes, but not for the editor. I've tried to set the value of txtVoorlooptekst to "" and other simalar approaches, but with no result.