Hi telerik support team:
Currently i am using telerik spell check control to perform spell check and encounter this error. After investigation, i notice that the script to register namespace Type.registerNamespace("Telerik.Web.UI.Spell"); is not loaded in to browser and cause HtmlElementTextSource is undefined in the code.
Together i attached with my coding to facilitate your investigation.
function startSpell()
{
GetSources();
var spell = GetRadSpell('<%= SpellCheckerTop.ClientID %>');
spell.set_textSource(new MultipleTextSource(sources));
spell.startSpellCheck();
}
function GetSources()
{
sources = new Array();
var i;
var j = 0;
for (i=0; i < document.forms[0].elements.length; i++)
{
if ((document.forms[0].elements[i].name.indexOf('spellCheckQuestion') > -1) || (document.forms[0].elements[i].name.indexOf('spellCheckAnswers') > -1))
{
sources[j] = new Telerik.Web.UI.Spell.HtmlElementTextSource(document.forms[0].elements[i]);
j++;
}
}
}
The problem occur at statement to assign Telerik.Web.UI.Spell.HtmlElementTextSource to sources array for performing multiple control spell check.
may i know what have i missed out that cause namespace Telerik.Web.UI.Spell is not registered ?
Thanks you
Currently i am using telerik spell check control to perform spell check and encounter this error. After investigation, i notice that the script to register namespace Type.registerNamespace("Telerik.Web.UI.Spell"); is not loaded in to browser and cause HtmlElementTextSource is undefined in the code.
Together i attached with my coding to facilitate your investigation.
function startSpell()
{
GetSources();
var spell = GetRadSpell('<%= SpellCheckerTop.ClientID %>');
spell.set_textSource(new MultipleTextSource(sources));
spell.startSpellCheck();
}
function GetSources()
{
sources = new Array();
var i;
var j = 0;
for (i=0; i < document.forms[0].elements.length; i++)
{
if ((document.forms[0].elements[i].name.indexOf('spellCheckQuestion') > -1) || (document.forms[0].elements[i].name.indexOf('spellCheckAnswers') > -1))
{
sources[j] = new Telerik.Web.UI.Spell.HtmlElementTextSource(document.forms[0].elements[i]);
j++;
}
}
}
The problem occur at statement to assign Telerik.Web.UI.Spell.HtmlElementTextSource to sources array for performing multiple control spell check.
may i know what have i missed out that cause namespace Telerik.Web.UI.Spell is not registered ?
Thanks you