Hello,
I have an MVC 3.0 project which uses a Telerik MVC editor, for which we wanted to add spell checking. Since MVC doesn't include RadSpell, I followed the instructions on these forums and elsewhere to integrate the Asp.Net AJAX spell check control.
From my Razor view I render a partial ascx view with the spell check control, and add a custom tool to the editor which calls this control via javascript. The Javascript function finds the spell check control, sets it's controltocheck property to the appropriate value, and then starts the spell checking.
This works great in IE8, however in Chrome or Firefox it fails because the command I use to find the control returns null in those browsers (BUT finds the correct control in IE).
I've attached a small demo project that shows this problem. I've seen some suggestions that this maybe a timing issue with the function running before the control is initialized, though this seems unlikely, and besides the suggested solutions to that (e.g. Sys.Application.add_load() don't fix the issue. Please help me resolve this problem.
I have an MVC 3.0 project which uses a Telerik MVC editor, for which we wanted to add spell checking. Since MVC doesn't include RadSpell, I followed the instructions on these forums and elsewhere to integrate the Asp.Net AJAX spell check control.
From my Razor view I render a partial ascx view with the spell check control, and add a custom tool to the editor which calls this control via javascript. The Javascript function finds the spell check control, sets it's controltocheck property to the appropriate value, and then starts the spell checking.
This works great in IE8, however in Chrome or Firefox it fails because the command I use to find the control returns null in those browsers (BUT finds the correct control in IE).
function
checkSpelling(id) {
var
spell = $telerik.findSpell(
'<%= RadSpell1.ClientID %>'
);
spell.set_controlToCheck(id+
"Iframe"
);
spell.startSpellCheck();
}
I've attached a small demo project that shows this problem. I've seen some suggestions that this maybe a timing issue with the function running before the control is initialized, though this seems unlikely, and besides the suggested solutions to that (e.g. Sys.Application.add_load() don't fix the issue. Please help me resolve this problem.