I have multiple textboxes that need spelled checked, I placed a WebSpellChecker control on the page for each text box, but when I click the button the dialog flashes a few times, and i only see the text for the last text box being checked....and it disapears....can't fix any errors.
How can I do this?
Also, is there a way to know that the spell check has been completed so that I can display a save button only after the spellcheck has been run?
The problem with this approach - if you correct a spelling in one control and then select "Change all" or ignore misspeling and then select "Ignore all" - this will work within current control only. If the same misspeling happens in the next control - user will get prompted again. Is there any way to remember what corrections were made from control to control in case of "...All" was clicked so user won't get prompted again?
HI NervousRex,
i created sample page that spell checks two webtextedit controls and enables a webimagebutton when the spell checking completes.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="Infragistics2.WebUI.WebDataInput.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %><%@ Register Assembly="Infragistics2.WebUI.WebSpellChecker.v7.3, Version=7.3.20073.1043, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebSpellChecker" TagPrefix="ig_spell" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title>
<script id="igClientScript" type="text/javascript"><!--function checkspelling(){//debugger; var spellchecker1 = ig_getWebControlById("WebSpellChecker1"); var text1 = igedit_getById("WebTextEdit1") spellchecker1.checkSpelling(text1.getText()); var spellchecker2 = ig_getWebControlById("WebSpellChecker2"); var text2 = igedit_getById("WebTextEdit2") spellchecker2.checkSpelling(text2.getText()); }
function WebSpellChecker1_SpellCheckComplete(oWebSpellChecker, oEvent, uncheckedText, checkedText){ //Add code to handle your event here. }
function Button1_onclick() {checkspelling();}
function WebSpellChecker2_SpellCheckComplete(oWebSpellChecker, oEvent, uncheckedText, checkedText){ //Add code to handle your event here.// debugger; var button = ig_getWebControlById("WebImageButton1"); button.setEnabled(true);}// --></script> </head><body> <form id="form1" runat="server"> <div> <igtxt:WebTextEdit ID="WebTextEdit1" runat="server"> </igtxt:WebTextEdit> <igtxt:WebTextEdit ID="WebTextEdit2" runat="server"> </igtxt:WebTextEdit> <ig_spell:WebSpellChecker ID="WebSpellChecker1" runat="server" StyleSetName="" StyleSetPath="" StyleSheetDirectory="" TextComponentId="WebTextEdit1"> <ClientEvents SpellCheckComplete="WebSpellChecker1_SpellCheckComplete" /> </ig_spell:WebSpellChecker> <ig_spell:WebSpellChecker ID="WebSpellChecker2" runat="server" StyleSetName="" StyleSetPath="" StyleSheetDirectory="" TextComponentId="WebTextEdit2"> <ClientEvents SpellCheckComplete="WebSpellChecker2_SpellCheckComplete" /> </ig_spell:WebSpellChecker> </div> <input id="Button1" type="button" value="button" onclick="return Button1_onclick()" /> <igtxt:WebImageButton ID="WebImageButton1" runat="server" OnClick="WebImageButton1_Click"> </igtxt:WebImageButton> </form></body></html>