This is a migrated thread and some comments may be shown as answers.

"Out of Stack Space" error with Spell

2 Answers 58 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 14 Feb 2011, 09:20 PM
I've modified an existing (working) ASP webpage by adding auto spellcheck per the example code.  There are two text boxes, one of which is seldom used, so I'd rather spell check them seperately (rather than use ControlsToCheck and getting both at the same time). 

Specifically, I've added two RadSpell controls:

<telerik:RadSpell id="RadSpellRepairOnly" runat="server" controltocheck="RepairTextBox" buttontype="None" IsClientID="true" />
<telerik:RadSpell id="RadSpellInstructionsOnly" runat="server" controltocheck="InstructionsTextBox" buttontype="None" IsClientID="true" />

...two scripts:

function spellCheckRepair() {
GetRadSpell(
'<%= RadSpellRepairOnly.ClientID %>').startSpellCheck();
}

 function spellCheckInstructions() {
GetRadSpell(
'<%= RadSpellInstructionsOnly.ClientID %>').startSpellCheck();
}

 


...and modified the two textboxes accordingly:

<asp:TextBox ID="RepairTextBox" runat="server" Rows="12" Width="100%" TextMode="MultiLine" BorderColor="White" onblur="javascript: spellCheckRepair();"></asp:TextBox>

 <asp:TextBox ID="InstructionsTextBox" runat="server" Rows="6" Width="100%" TextMode="MultiLine" BorderColor="White" onblur="javascript: spellCheckInstructions();"></asp:TextBox>

 


This works, but if I jump between the text boxes more than once I get an 'out of stack space' exception and execution is halted.  Is this not a supported configuration?

 

 

 

2 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 17 Feb 2011, 12:33 PM
Hi Henry,

You should not fire the spellchecker in the blur event of textboxes because when you move the focus from the first to the second textbox, the first spellchecker will be launched and its RadWindow dialog will take focus. This will automatically fires the blur event of the second textbox which will launches the second spellchecker dialog. It is better to put buttons next to every textbox which will fire the spellchecker of the specific textbox.

Another approach is to have a single spellchecker on the page which will spell check all textboxes when submitting the content.

Best wishes,
Rumen
the Telerik team
0
Henry
Top achievements
Rank 1
answered on 17 Feb 2011, 06:43 PM
Makes sense.  Thanks for the explanation and the suggestion.
Tags
Spell
Asked by
Henry
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Henry
Top achievements
Rank 1
Share this question
or