ASP.NET 3.5 and above only

Obout.Ajax.UI Controls - Spell Checker - Spell check on submit

Checked text can be submitted here only.
TextBoxes will be submitted if their text doesn't contain misspellings or if you click "OK" in the Spell Checker popup for each TextBox.



Submit
ASP.NET
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor" TagPrefix="obout" %>
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.HTMLEditor.Popups" TagPrefix="obout" %>
<%@ Register Assembly="Obout.Ajax.UI" Namespace="Obout.Ajax.UI.SpellChecker" TagPrefix="obout" %>
<obout:PopupHolder runat="server" id="popupHolder" >
<Preload>
<obout:SpellCheckPopup ID="SpellCheckPopup1" runat="server"
  ShowOnResult="true" AutoCloseOnGoodResult="true" />
</Preload>
</obout:PopupHolder>
<asp:UpdatePanel ID="updatePanel1" runat="server">
<ContentTemplate>
<asp:TextBox runat="server" Rows="5" Columns="60" Text="qqq aaa text mmm"
  TextMode="MultiLine" id="textbox1" spellcheck="false" />
<asp:TextBox runat="server" Rows="5" Columns="60" Text="qqq aaa text mmm"
  TextMode="MultiLine" id="textbox2" spellcheck="false" />
<br /><br />
<asp:LinkButton runat="server" Text="Submit" OnClientClick="return false;" ID="button" />
<obout:SpellCheckExtender runat="server" ID="spelcheck" PopupHolderID="popupHolder"
  PopupButtonID="button" TargetControlIDs="textbox1,textbox2"
  OnClientCheckFinished="checkFinished" LeftMarker="[[" RightMarker="]]"
/>
</ContentTemplate>
</asp:UpdatePanel>
...
<script type="text/JavaScript">
function checkFinished(sender, args) {
    // for all TextBoxes was clicked or emulated 'OK' in SpellChecker popup?
    if (args.get_targetsCount() == args.get_targetsAccepted().length) {
        // yes - force submit
        __doPostBack(sender.get_button().id.replace(/_/, "$"), "");
    }
}
</script>

"All the compliments on your site are well deserved - I've always received good support from you."

Paul Millefolie

Random testimonial   All testimonials