Multiple SpellCheckers

15 replies. Last post: January 14, 2010 2:41 AM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

Hello, 

Thanks in advance for any help, 

I have a repeater creating textboxes and i need to have them all spellchecked so i create a spell check button for every text box and programmatically create the Spell Checker, (i'm not aware that i can use one spell checker for more than one control)

Here is my code: .cs (  on the ItemDataBound event of the repeater)

Panel pnl = (Panel)e.Item.FindControl("pnlSpellCheck");
WebSpellChecker wsCheck = new WebSpellChecker { ID = "wsCheck" e.Item.ItemIndex, TargetControlId = txtTextBox.UniqueID, Height = 500, Width = 700, TargetControlIdValue = "value", CssClass = "SpellCheck" };
pnl.Controls.Add(wsCheck);
WebButton btn = (WebButton)pnl.FindControl("btnSpellCheck");
btn.OnClientClick = "CheckSpell('" e.Item.ItemIndex "')";

 Javascript:

function CheckSpell(id) {
var sp = ISGetObject("wsCheck" id);
sp.CheckSpell();
return false;
}

 Markup: (inside a repeater)

<asp:Panel id="pnlSpellCheck" runat="server">
<ISWebDesktop:WebButton ID="btnSpellCheck" runat="server" Height="20px" OnClientClick="CheckSpell"
Text="Spell Check" Width="150px">
<ButtonStyle>
<Normal CssClass="FPB-Button-N">
</Normal>
<Over CssClass="FPB-Button-O">
</Over>
<Active CssClass="FPB-Button-A">
</Active>
</ButtonStyle>
</ISWebDesktop:WebButton>
</asp:Panel>

 

I get a javascript popup:

An error occurred: 

<the page source>

All times are GMT -5. The time now is 8:00 PM.
Previous Next