"Out of Stack Space" error with Spell

3 posts, 0 answers
  1. Henry
    Henry avatar
    5 posts
    Member since:
    Nov 2010

    Posted 14 Feb 2011 Link to this post

    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. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 17 Feb 2011 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Henry
    Henry avatar
    5 posts
    Member since:
    Nov 2010

    Posted 17 Feb 2011 Link to this post

    Makes sense.  Thanks for the explanation and the suggestion.
Back to Top