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

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

1 Answer 45 Views
Spell
This is a migrated thread and some comments may be shown as answers.
Rohn
Top achievements
Rank 1
Rohn asked on 16 Feb 2009, 06:04 AM

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.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 18 Feb 2009, 05:30 PM
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.
Tags
Spell
Asked by
Rohn
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or