Generic spell check function; How to pass in the text control object

2 posts, 1 answers
  1. Rohn
    Rohn avatar
    3 posts
    Member since:
    Feb 2009

    Posted 16 Feb 2009 Link to this post

    I am using a Button type of image so I am calling the below functon from my onclientclick event

    function

    spellCheckDescription()

     

    {

     

     

    var spell = GetRadSpell('<%= txtDescription.ClientID %>');

     

    spell.StartSpellCheck();

     

     

    return false;

     

    }

    This works fine but I would like to pass in the text box control to check instead of hard coding it. I need to check 10 large text fields on my form and do not want to create a function for each, nor check them all at once.

    How can I modify the above function so that it is generic to enable the passing of the control?

    Thanks.

     

  2. Answer
    Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 18 Feb 2009 Link to this post

    Hi Rohn,

    Have you tried by any chance to set the ControlsToCheck property of RadSpell to lists all 10 textboxes that you want to spellcheck? You can see the following live example for more information:
    Checking Multiple Controls.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top